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  September 2011

FSL September 2011

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Fixed effects with FLOBS? and FLIRT-Error

From:

Stefanie Becker <[log in to unmask]>

Reply-To:

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

Date:

Mon, 26 Sep 2011 20:30:45 +1000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (206 lines)

Dear Mark,

thanks for the advice. I've got the problem that my 2 Honours students need to submit their honours thesis in 2.5 weeks and that we're stuck in the higher-level analysis (over FLOBS used in first-level analysis). I realise it's maybe already too late, but I'll give this one more shot, in the hope that my students can report some portion of the data.
However, at this stage, I would need some very detailed information (about how to bring the zfstats from the first-level analysis to the higher-level analyses). [I'm more than happy to pay the standard consultant fee of AUD 150/hour for anyone who's able and willing to help me quickly with this.]

So: I have so far registered some zfstat images to standard space using the the ApplyXFM gui; I tried many different things and figured out that this is probably the correct way to do it(?):
transformation matrix: example_func2standard.mat
input image: thresh_zfstat1.nii.gz [tried the zfstat.nii.gz from the stats folder as well]
reference volume: MNI152_T1_2mm_brain.nii.gz
-- I tried the advanced options in the ApplyXFM gui both with 'force data output to be floating point' and without.

A first important question would be: Should I take thresh_zfstat.nii.gz or the zfstat1.nii.gz (from the stats folder)? 

Computing the sum(zfstat)/sqrt(n) shouldn't be a problem; I've got 4 runs -- to combine them in an analogue of a FE analysis, I envisage doing something like that with the registered zfstat images (let's label them 'zfstat_stand');
fslmaths zfstat1_stand.nii.gz -add zfstat2_stand.nii.gz -add zfstat3_stand.nii.gz -add zfstat4_stand.nii.gz added_zfstats_stand.nii.gz
fslmaths added_zfstats_stand.nii.gz -div 2 divs_zfstats_stand.nii.gz

-- correct?

Now I had the problem that I couldn't enter the results into a higher-level analysis. I used the Feat Gui, tried to simply average the zfstats (registered to standard space, etc.) with FLAME1, and chose cope images as input files. But FEAT always crashed in the higher-level input files preparation.

When I took the images resulting from applyxfm when output data format float was enforced, I got the following error message in feat (image file preparation):

mean_func  /mnt/hgfs/G/MRI/MRI_Jessie/Data/Converted/S1/DIM1_FLOBS.feat/reg_standard/mean_func /mnt/hgfs/G/MRI/MRI_Jessie/Data/Converted/S1/DIM2_FLOBS.feat/reg_standard/mean_func
/root/fsl/bin/fslmaths mean_func -Tmean mean_func
syntax error in expression "1 + zfstats_stand_div": variable references require preceding $
    while executing
"expr 1 + $copenumber "
    (procedure "feat5:proc_gfeatprep" line 267)
    invoked from within
"feat5:proc_gfeatprep "
    ("-gfeatprep" arm line 2)
    invoked from within
"switch -- [ lindex $argv $argindex ] {
 -I {
...

When I used the images where I had NOT enforced output data format float, I got the following error (in feat, file image preparation).

/root/fsl/bin/fslmaths mean_func -Tmean mean_func
syntax error in expression "0 + ": premature end of expression
    while executing
"expr $mean_lcon + $mean_lcon_incr "
    (procedure "feat5:proc_gfeatprep" line 272)
    invoked from within
"feat5:proc_gfeatprep "
    ("-gfeatprep" arm line 2)
    invoked from within
"switch -- [ lindex $argv $argindex ] {
...

Then I tried renaming the images (resulting from fslmaths) cope11.nii.gz, etc..., but with these images, FEAT ignored that I had selected the higher-level cope images as inputs to the higher-level analysis, and simply replaced the inputs with the following:

1 /mnt/hgfs/G/MRI/MRI_Jessie/Data/Converted/S1/DIM1_FLOBS.feat/report.html
2 /mnt/hgfs/G/MRI/MRI_Jessie/Data/Converted/S2/DIM1_FLOBS.feat/report.html

That wasn't at all what I had intended, so I stopped that analysis.

I then tried re-naming my averaged zfstats 'cope1.nii.gz' (in the hope that FEAT would take the cope1 as a default and would then analyse my zfstats). As before, FEAT did not accept the copes but took as input:
 
1 /mnt/hgfs/G/MRI/MRI_Jessie/Data/Converted/S1/DIM1_FLOBS.feat/report.html
...
4 /mnt/hgfs/G/MRI/MRI_Jessie/Data/Converted/S2/DIM1_FLOBS.feat/report.html

I think FEAT then took the original cope-files from the first-level analysis that I had renamed 'cope1xxx'. At least I found a reference to this in the log-file (FEAT higher-level input file preparation):
/root/fsl/bin/flirt -ref reg/standard -in stats/cope1xxx -out frgrot_yaCSvH -applyxfm -init reg/example_func2standard.mat -interp trilinear -datatype float

The analysis is still running (seems to be hanging on the varcope = /root/fsl/bin/fslmaths varcope1 -mas mask varcope1), but even if it completes, I guess that didn't work out.


What I in fact need to do is something like a random-effects analysis comparing the averaged zfstats between different within-subjects conditions. Each subject provided data in 2 blocked conditions that consisted of 4 runs each; the DIM-condition is one condition; let's call the other condition XDIM. We're interested in brain regions that are more active in a specific condition of DIM (EV1, EV2 = 1, -1) than in a specific condition of XDIM (EV1, EV2 = 1, -1) and vice versa. The contrasts 1 -1 were computed at the first level using FLOBS (resulting in zfstat1). Now I would like to average these data across the 4 runs for each subjects (that's done with sum(zfstat)/sqrt(n)).
After that, I need to combine the data from different subjects and conditions, comparing 'EV1>EV2' across the DIM and XDIM conditions -- at this stage I'm not sure whether I should be using FLAME1 for this; in one thread it was said that, with multiple basis functions and zfstats, a random-effects analysis could be approximated with an OLS analysis. So should I be using OLS instead? 

In any case, the main problem is that I can't get FEAT to accept the averaged zfstats as inputs to any higher-level analysis. (At this stage, and for the Honours theses, I'm not too concerned about choosing the statistically most appropriate analysis.)

Any help will be greatly appreciated!

Thanks,
Stefanie

***************************************************

Dr. Stefanie I. Becker
School of Psychology
McElwain Building, Room 203
The University of Queensland
St Lucia, QLD 4072
Australia

email: [log in to unmask]
mobile: +61 449 883 870.

homepage: www.sibecker.de
________________________________________
From: FSL - FMRIB's Software Library [[log in to unmask]] On Behalf Of Mark Jenkinson [[log in to unmask]]
Sent: Thursday, 22 September 2011 8:24 PM
To: [log in to unmask]
Subject: Re: [FSL] Fixed effects with FLOBS? and FLIRT-Error

Dear Stefanie,

The first error looks like you've mistyped the name of the file as it is constantly
complaining about "MNI152T_1_2mm_brain" rather than "MNI152_T1_2mm_brain"
(note that T_1 should be _T1).  In your command line it looks correct, but maybe
that is because you retyped it into the email and inadvertently fixed it?!?  It is hard
to be sure.  However, your command line is still not good, as you need to specify
other options - specifically -applyxfm, -init and -out.  Have a look at the example
usages in the documentation:
  http://www.fmrib.ox.ac.uk/fsl/flirt/examples.html
I would also advise looking at the FSL Course material if you are this unfamiliar
with how things work.

The other error I suspect is to do with the that that you seem to have chosen
a filename of "1" which is very strange and may be misinterpretted as a number
rather than a name at some point.  It is a very odd error though, so I would try
and get the command line working instead.

I'm assuming that you've run registration in your original FEAT analysis, in
which case you need to be using the example_func2standard transformations
in the *.feat/reg directory.  Again, look at the FSL Course material and the FEAT
documentation for more help about this.

All the best,
        Mark



On 22 Sep 2011, at 09:51, Stefanie Becker wrote:

> Hi,
>
> thanks for the response! And sorry for the confusion with FLOBS vs. canonical HRF; I've used FLOBS to analyse my data from separate runs, and I would like to average the results from the combined basis functions, or zfstats ('C1&C2&C3') across runs. Now, I've tried to register the corresponding zfstat1.nii.gz to standard space (only linear registration), but wasn't able to do it.
>
> First, I used flirt from the terminal window:
>
> flirt -in /mnt/hgfs/F/MRI/MRI_Jessie/Data/Converted/S1/DIM1_FLOBS.feat/thresh_zfstat1.nii.gz -ref /root/fsl/data/standard/MNI152_T1_2mm_brain
>
> ... but I got the following errors:
>
> ** ERROR (nifti_image_read): failed to find header file for '/root/fsl/data/standard/MNI152T_1_2mm_brain'
> ** ERROR: nifti_image_open(/root/fsl/data/standard/MNI152T_1_2mm_brain): bad header info
> ERROR: failed to open file /root/fsl/data/standard/MNI152T_1_2mm_brain
> ERROR: Could not open image /root/fsl/data/standard/MNI152T_1_2mm_brain
> Image Exception : #22 :: Failed to read volume /root/fsl/data/standard/MNI152T_1_2mm_brain
> terminate called after throwing an instance of 'RBD_COMMON::BaseException'
> FE_bash.sh: line 11: 30613 Aborted
>
>
> Second, I tried using FLIRT from the FEAT GUI;
> [/root/fsl/bin/flirt -in /mnt/hgfs/F/MRI/MRI_Jessie/Data/Converted/S1/DIM1_FLOBS.feat/thresh_zfstat1.nii.gz -ref /root/fsl/data/standard/MNI152_T1_2mm_brain -out  -omat 1.mat -bins 256 -cost corratio -searchrx -180 180 -searchry -180 180 -searchrz -180 180 -dof 12  -interp trilinear]
>
> but here the error message said:
> Unrecognised option 1
>
> I got the same error when I tried to register the zfstat to my T1-weighted, brain-extracted image:
> /root/fsl/bin/flirt -in /mnt/hgfs/F/MRI/MRI_Jessie/Data/Converted/S1/DIM1_FLOBS.feat/thresh_zfstat1.nii.gz -ref /mnt/hgfs/F/MRI/MRI_Jessie/Data/Converted/S1/T1_brain.nii.gz -out  -omat 1.mat -bins 256 -cost corratio -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 12  -interp trilinear
> Unrecognised option 1
> Finished
>
> Any idea what's going wrong here?
> Also, in general, should I register the zfstat directly to standard space, or should I first register it to the T1-image?
>
> Thanks a lot in advance!
> Stef
> ________________________________________
> From: FSL - FMRIB's Software Library [[log in to unmask]] On Behalf Of Stephen Smith [[log in to unmask]]
> Sent: Thursday, 22 September 2011 5:31 PM
> To: [log in to unmask]
> Subject: Re: [FSL] Fixed effects with FLOBS?
>
> Hi - yes if you have done an F-test across the FLOBS basis functions you can resample the zstats or fstats into standard space and feed that into randomise.
> You can use the ApplyXFM GUI to resample the stats into standard space - though if you used nonlinear registration you would need to do this on the command line.
>
> However - the main question is that I'm confused that you're talking about both FLOBS and canonical HRFs - these are two distinct HRF options so I'm not sure quite what you've done...
>
> Cheers.
>
>
>
>
>
> On 20 Sep 2011, at 18:24, Stefanie Becker wrote:
>
>> Hi,
>>
>> I sent two messages to the list that don't appear in the September thread -- not sure what happened there.
>> I'll try again: I've got the problem that I need to combine data in a fixed effects analysis based on FLOBS, and I'd like to use the canonical HRF regression PEs. According to the posts, back in 2008, there was no simple solution to this problem, as the first-level analysis doesn't produce copes for the canonical HRF, only the single basis functions.
>>
>> Is there a simple solution now? If not, can I resample the zfstats into standard space and average across them using the function sum(z)/sqrt(n)?
>> This solution was suggested as an analogue to a fixed effects analysis in an earlier thread... but is it then possible to use the output for a third-level ME analysis comparing between different conditions?
>> And if yes, what function do I have to use for the resampling and averaging?
>>
>> THANKS!!!
>>
>> Stefanie
>>
>
>
> ---------------------------------------------------------------------------
> Stephen M. Smith, Professor of Biomedical Engineering
> Associate Director,  Oxford University FMRIB Centre
>
> FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
> +44 (0) 1865 222726  (fax 222717)
> [log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
> ---------------------------------------------------------------------------

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

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