JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for FSL Archives


FSL Archives

FSL Archives


FSL@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

FSL Home

FSL Home

FSL  August 2007

FSL August 2007

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Mixing COPES from different levels in FEAT

From:

Sophie Anisa <[log in to unmask]>

Reply-To:

FSL - FMRIB's Software Library <[log in to unmask]>

Date:

Mon, 20 Aug 2007 18:34:41 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (216 lines)

Hi, I have a problem with analysing a slightly complicated design in
FEAT and would
like some advice about FEAT internals.

Main question. Is it possible *in principle* to set up a third level
model in FEAT which
takes its inputs from a mixture of 1st level COPES and 2nd level COPES?


(1) Background. I have a design that looks like this

Subject    TASK    Run Repeat
1              A          1
1              B          1
2              A          1
2              B          1
2              A          2
2              B          2
3              A          1
3              B          1
3              A          2
3              B          2
...
etc

In other words all subjects *except* the first subject do 2 runs of
task A and 2 runs of task B.  But subject 1 did only 1 run of task A
and task B.

I have previously analysed this data set using v3.3 of FEAT and
following the instructions for
the 3 level multisubject multisession design using a 2nd level
analysis to model the cross
session variance. This worked fine. I suppose I should have stopped
when I was ahead but
alas I did not. Eager to see what surprises awaited me I then tried
reananlysing (using v3.3) the data with the new advice now given for
FSL v4 on multisubject multisession designs. I created new 2nd level
FE analyses for all subjects (*except* subject 1) using a higher level
FE design to combine the 2 runs for task A and the 2 runs for task B.

At this stage I have

Subject   Task   FEAT Level
1             A       1
1             B       1
2             A       2
2             B       2
3             A       2
3             B       2
..
etc


(2) Firstly, I tried to combine these at third level (e.g. simple
group average for task A) by
using as input FEAT dirs:

subject1_A.feat
subject2_A.gfeat
subject3_A.gfeat
etc

This fails with "Error - registration has not been run" for all inputs
after subject 1.
Clearly, this is a wrong thing to do.

Q: I assume at this point that I cannot use the above option of using
"lower level FEAT dirs" because there is a mismatch between the two
levels?

Subjects 2 onwards are level 2 .gfeat analyses. Inside these directories
are cope1.feat etc that relate only to EV 1, whereas the subject 1
level 1 .feat
directory contains all the stats/cope images and reg_standard/stats/cope images.
So I assume it also makes no sense to setup a 3rd level model with inputs:

subject1_A.feat
subject2_A.gfeat/cope1.feat
subject3_A.gfeat/cope1.feat
etc?

Thus, it seems I need to use as input type "3D COPE images from FEAT dirs"
Q: I hope all my assumptions and logic are correct so far?


(3) I then set up a third level model for the simple group average for
EV1 in task A by
using as inputs the COPEs

subject1_A.feat/stats/cope1.nii.gz
subject2_A.gfeat/cope1.feat/stats/cope1.nii.gz
subject3_A.gfeat/cope1.feat/stats/cope1.nii.gz

and ran this. It *appeared* to work and produced rendered images
(but see below)


(4) Encouraged, I went on and reran my more complicated 2x3 factorial design
that I have previously emailed you about:
http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind0707&L=FSL&P=R40723&I=-3

Although this *appeared* to run, the rendered stats images showed no
activation - completely different to the previous analysis I had run
using the earlier recipe for multisubject multisession analysis that
the FSL web page showed. Digging into the
log files showed multiple errors like this in cope1.feat/report.log:

/usr/local/fsl/bin/avwroi tdof_filtered_func_data tmptdof9 0 91  0 109  9 1

/usr/local/fsl/bin/flame --cope=tmpcope9 --vc=tmpvarcope9
--dvc=tmptdof9 --mask=tmpmask9 --ld=stats9 --dm=design.mat
--cs=design.grp --tc=design.con --fc=design.fts --ols --nj=10000
--bi=500 --se=1 --fm
--zlt=2.25 --zut=2.65
Log directory is: stats9
Setting up:
nevs=21
ntpts=96
ngs=1
nvoxels=88
Running:
nmaskvoxels=2
njumps = 10000
burnin = 500
sampleevery = 1
nsamples = 9500

Metropolis Hasting Sampling
Number of voxels=2
Percentage done:
 1


An exception has been thrown
Logic error:- detected by Newmat: index error: requested index = 91

MatrixType = Rect   # Rows = 90; # Cols = 1


After digging into this further, I found the problem was that the
tdof_filtered_func_data.nii.gz file in the cope1.feat subdir was the
wrong size.
I have 16 subjects, and there are 6 COPES in this experiment. I
therefore expect
the intermediate merged files in the gfeat/cope1.feat dirs to have
16*6 = 96 vols.

And indeed this is the case for merged cope and varcope files:

avwinfo filtered_func_data.nii.gz | grep "^dim4"
dim4           96
avwinfo var_filtered_func_data.nii.gz | grep "^dim4"
dim4           96

but not for the tdof file:

avwinfo tdof_filtered_func_data.nii.gz | grep "^dim4"
dim4           90

Q: Is this a bug or am I doing something wrong?
If so, what is the correct way of doing this?


(5) Finally, as sanity check I have:

(a) gone back to my simple group analysis explained in (2) above and looked at
it more carefully. The tdof mismatch is here too, and has presumably corrupted
my final output stats, but oddly it did not create any errors in the
report.log file.

filtered_func_data.nii.gz         dim4           16
var_filtered_func_data.nii.gz   dim4           16
tdof_filtered_func_data.nii.gz  dim4           15


(b) rerun the factorial model using FSLv4 (FEAT 5.90). This causes similar
errors to be reported in cope1.feat/report_log.html

usr/local/fsl4/bin/flame --cope=tmpcope0 --vc=tmpvarcope0
--dvc=tmptdof0 --mask=tmpmask0 --ld=stats0 --dm=design.mat
--cs=design.grp --tc=design.con --fc=design.fts --ols
--nj=10000 --bi=500 --se=1 --fm --zlt=2.25 --zut=2.65

An exception has been thrown
Logic error:- detected by Newmat: index error: requested index = 91

MatrixType = Rect   # Rows = 90; # Cols = 1
Trace: Mcmc_Mh::setup; Gsmanager::run.

And once again the volume sizes of the merged files are out of sync:

filtered_func_data.nii.gz          dim4           96
var_filtered_func_data.nii.gz    dim4           96
tdof_filtered_func_data.nii.gz   dim4           90

It appears that the problem comes in the creation of the merged
tdof_filtered_func_data file. On creation of this file, the FEAT
analysis silently
drops the tdof volumes that should have been present from subject 1,
without any
warnings being generated. Presumably these are not created for first
level analyses,
and this is the real origin of the problem? In which case, I refer
back to my original
question about whether one can mix COPEs from different levels? And if so, how
best to do it?

Apologies for the long email but I hope I have explained the problem clearly.
Please advise!


kind regards

Sophie

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager