Thank you for all your comments. The idea is not to do the processing exactly as in SPM, but rather to perform standard processing with FSL. I will start with FEAT and see how it goes.
/Anders
________________________________________
Från: FSL - FMRIB's Software Library [[log in to unmask]] för wolf zinke [[log in to unmask]]
Skickat: den 22 november 2012 10:38
Till: [log in to unmask]
Ämne: Re: [FSL] SV: [FSL] Bash scripts
Btw, if you want to compare different analysis streams, it might be worth to check out the nipype package: http://nipy.sourceforge.net/nipype/
But maybe, this is a bit of an overkill, if you just want to repeat a study.
wolf
On 11/22/2012 03:32 PM, Anders Eklund wrote:
Hi,
I want to repeat this study, with FSL instead of SPM. It will be very time consuming if I have to run it through a GUI.
http://www.sciencedirect.com/science/article/pii/S1053811912003825
/Anders
________________________________
Från: FSL - FMRIB's Software Library [[log in to unmask]<mailto:[log in to unmask]>] för Eugene Duff [[log in to unmask]<mailto:[log in to unmask]>]
Skickat: den 21 november 2012 17:34
Till: [log in to unmask]<mailto:[log in to unmask]>
Ämne: Re: [FSL] Bash scripts
Hi Anders,
It is a bit unclear exactly what you want to do. In most cases, if it is not possible to run it directly from the gui, it is simplest to create design.fsf files from the Feat gui, and edit these through the command line using text processing tools doing things like, e.g. find/replace. I've attached a script setFEAT (don't think it's in FSL) that helps edit design.fsf s
Cheers,
Eugene
On 21 November 2012 21:53, Anders Eklund <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Dear FSL experts,
I want to perform some fMRI analysis of a large number of fMRI datasets through bash scripts. There seems to be several introductions on how to analyze fMRI data through the FSL gui but I can't find any template bash script.
I have started on a bash script for single subject fMRI analysis (the produced results will later be used in another script for multi subject analysis) but I have several questions;
Is it easier to setup an fsf-file and simply run feat ?
Yes
Should I perform motion correction before registering the EPI data to the T1 volume?
Yes
How do I perform registration between EPI and the T1 volume?
Easiest through the running the feat design files
How do I add estimated motion parameters as additional regressors? Concat the motion parameters to design.mat?
No.
How does the prewhitening with film_gls interact with fsl_glm ?
Is there an easy way to create a brain mask for the EPI data?
Yes. If you want to see what Feat is doing, look in the files in a Feat log directory.
-----------------------
# Segment the brain from the T1 volume
bet T1.nii.gz T1_brain.nii.gz
# Do registration between brain T1 and brain MNI
flirt -ref ${MNI_TEMPLATE} -in T1_brain.nii.gz -omat anat_2_mni_xform.mat
# Motion correction
mcflirt -in fMRI.nii.gz -plots
# Do registration between EPI and T1
flirt -ref T1.nii.gz -in ??? -omat epi_2_anat_xform.mat
# Create total transformation matrix between MNI and EPI
convert_xfm -omat mni_2_epi_xform.mat -concat anat_2_epi_xform.mat mni_2_anat_xform.mat
# Create total transformation matrix between EPI and MNI
convert_xfm -omat epi_2_mni_xform.mat -inverse mni_2_epi_xform.mat
# Transform MNI mask to EPI space
flirt -in ${MNI_MASK} -ref ???
# Perform smoothing of motion corrected volumes
fslmaths fMRI_mfc.nii.gz -kernel gauss 8 fMRI_mfc_s.nii.gz
# Perform prewhitening
film_gls -sa ???
# Perform GLM analysis
fsl_glm -i fMRI_mfc_s.nii.gz -d design.mat -o betas.nii.gz -c model.con -m ${EPI_MASK}
# Transform beta volume to MNI
flirt -in betas.nii.gz -ref ${MNI_TEMPLATE} -applyxfm -init epi_2_mni_xform.mat -out betas_mni.nii.gz
Regards,
Anders
|