Hi A-M,

I am not sure how complex your design is or how much you are hoping to script vs. run via the gui, but I wanted to add that hand scripting can create complications for your higher-level design, depending on how complex the design is and how far you stray from what the gui does. When you run your analysis through the FEAT gui, it creates files and a directory structure at each level, which each subsequent level searches for. Some of these files and structures are more easy to create/mimic/work around manually than others. (Martin's excellent suggestion will keep you working within the gui framework, just executing from the command line).

For non-gui scripting, I have found that the best way to get started is to use the commands in the feat report.html file of a previous analysis (which you might have to borrow from someone).

Jessica

On Fri, Apr 2, 2010 at 7:07 AM, Martin M Monti <[log in to unmask]> wrote:
Hi A-M,

one way of scripting that has worked very well for me is the following:

1. manually create from the GUI one sample file e.g. Sample.fsf
2. open Sample.fsf and replace the 'variable' info (e.g. subject name, TRs) with placeholders (e.g. ###SUB###  ###TR### )
3. use the sed function to generate files for all the other subjects:
 For example, the following would create 5 new files, called Subject1.fsf, Subject2.fsf, ...,  substituting, in each, the placeholder ###SUB### with Subject1 (in the first), Subject2 (in the second), etc..:

foreach i (1 2 3 4 5)
sed -e 's/###SUB###/Subject${i}/g' Sample.fsf  > Subject${i}.fsf
end

Then all you have to do is launch feat from the command line..

hope this helps

martin


AMDC wrote:
Hi there,

Other than what's available at http://www.fmrib.ox.ac.uk/fslcourse/ are there more resources for FSL scripting, or even sample scripts that can be learned from to extrapolate to more complex experimental designs? Though I have some unix experience, I am new to FSL scripting and not sure how much I can do outside of the GUI

Thanks,

A-M
 

--


“Well! I’ve often seen a cat without a grin,” thought Alice, “but a grin without a cat! It’s the most curious thing I ever saw in my life!” [Lewis Carroll, Alice in Wonderland]

----------------------------------------------------------
Martin M Monti, PhD
MRC Cognition and Brain Sciences Unit
15 Chaucer Road
Cambridge, CB2 7EF
Off. +44 (0) 1223 273646
http://www.mrc-cbu.cam.ac.uk/people/martin.monti/home.html
----------------------------------------------------------