Print

Print


Thanks, Dan and Mark, for those two solutions. That makes my life *much* easier.

Is setting a EV shape to "empty" exactly equivalent to creating a
custom file with a 0 0 0 entry? If so, the scripts become simpler
still because I can prepend a 0 0 0 row to the beginning of all my
text files and use the same design.fsf templates regardless of whether
or not there's an empty EV.

Thanks again,
Todd



On Thu, Jan 29, 2009 at 8:42 PM, Daniel Wolf <[log in to unmask]> wrote:
> Hi,
> I have been able to do this (get a 3 column empty EV to run) by generating a
> 3 column text file that says only:
> 0  0  0
> Dan
>
> On Thu, Jan 29, 2009 at 7:38 PM, Todd Thompson <[log in to unmask]> wrote:
>>
>> Thanks for the responses, they've been very helpful. I think bash
>> scripting is close to doing the trick for me, but there's a
>> frustrating hurdle that I'm not sure how to deal with cleanly.
>>
>> A simplified version of my problem is this:
>> A subject has 3 runs of an event-related flanker/arrows task. He
>> responds to a right arrow with a button in his right hand, and
>> responds to a left arrow with his left hand. I want to validate that
>> my analysis stream is working, so I set up a very simple model with
>> three conditions:incorrect, left-correct, and right-correct.
>>
>> As a sanity check that I see primary motor cortex for the button
>> presses, I set up a left-right contrast:
>>  contrast 1: [0 1 -1]
>>
>> I also want to see if I get an error-related response, so I create a
>> second contrast using just the incorrect trials:
>>  contrast 2: [1 0 0]
>>
>> Ok. There's the setup. The problem is that not all runs have even one
>> incorrect trial, some subjects on some runs perform perfectly. If I
>> create a base design.fsf with all 3 EVs and both contrasts, then use a
>> simple script based on 'sed' to change my run/subject numbers and
>> generate all my first-level analyses, the FEAT analysis fails whenever
>> it can't find a valid incorrect.txt file.
>>
>> If I 'touch' an incorrect.txt file so that a file will at least exist,
>> FILM throws an exception when it can't find a valid triplet inside
>> that file.
>>
>> If I try to change the script so that empty EVs aren't referenced at
>> all, things get very complicated, because this changes a lot of the
>> setup file and now all of my contrast numbering is different from run
>> to run and subject to subject.
>>
>> The behavior I'd *like* to see is that FEAT would allow an empty EV,
>> then throw a warning when it tried to generate a contrast that relied
>> on that EV, and perhaps generate a NaN output file instead of a
>> legitimate statmap. That way I can still run higher-level analyses
>> using the valid contrasts/subjects, but I don't have to hand-run every
>> first-level model.
>>
>> Has anyone solved this problem? I don't suppose there's a hidden
>> setting I've missed, is there? :)
>>
>> Thanks!
>> Todd
>>
>>
>> On Tue, Jan 27, 2009 at 7:12 PM, Eugene Duff <[log in to unmask]> wrote:
>> > Hi Todd,
>> >
>> > From your description, every run in the study has one of three stimulus
>> > orders, but is otherwise identical.  If this is the case, you should be
>> > able
>> > to run all the first-level analyses with only three analyses run in the
>> > GUI,
>> > one for each stimulus order.   For each, select the number of inputs to
>> > be
>> > fifteen,  and then specify all the runs with that stimulus order.  The
>> > rest
>> > of the setup is as normal.  You can specify registration target images
>> > specific for each run.
>> >
>> > If the stimulus timings/orders are unique for each run, I've always
>> > written
>> > small bash scripts using sed (find/replace) etc to edit an initial .fsf
>> > file.  The function you suggest is possible for some aspects of an
>> > analysis
>> > - I have a rough script that helps me edit certain aspects of design
>> > files -
>> > but many aspects of the modelling would be awkward to define/adjust from
>> > the
>> > command line.
>> >
>> > Eugene
>> >
>> > 2009/1/27 Todd Thompson <[log in to unmask]>
>> >>
>> >> Hi, all. I've spent a few hours wading through documentation and
>> >> google searches, but it's possible I've overlooked something obvious.
>> >> Apologies in advance, if so...
>> >>
>> >> I've got 15ish subjects from an experiment that I've previously
>> >> analyzed with other analysis packages, and I'd like to reanalyze them
>> >> with FSL to see if my results are cleaner/different.
>> >>
>> >> Short version of the experiment -- it's an event-related
>> >> heavily-modified flanker task. Each subject has three runs per
>> >> session. These runs were counterbalanced across subjects. (Subject1's
>> >> first run was Subject2's second run, et cetera.)
>> >>
>> >> I've generated a 3-column parameter file for each EV in every
>> >> subject's runs, but I don't know how to use those parameter files to
>> >> create a FEAT setup file (design.fsf) from the command line. As far as
>> >> I can tell, at this point I need to run 45 first-level analyses by
>> >> hand. Then, if I want to run the model including temporal derivatives,
>> >> I'll need to run another 45 first-level analyses by hand. And if I
>> >> want to include the reaction time as a duration instead of modelling
>> >> the event as impulses, then it's another 45, and so on...
>> >>
>> >> Is this right? I was hoping there'd be some way of creating a
>> >> design.fsf file with command line arguments. Maybe something like:
>> >> create_setup_file -volumes run1.nii -addev congruent.txt -addev
>> >> incongruent.txt -use_tds ...
>> >>
>> >> Then I could generate those commands from a batch script, and I'd be
>> >> good
>> >> to go.
>> >>
>> >> Am I overlooking something? How do other people do this?
>> >>
>> >> Thanks!
>> >> Todd
>> >
>> >
>> >
>> > --
>> > ----------------------------------------------------------------
>> >
>> > Eugene Duff, PhD
>> >
>> > FMRIB Centre,
>> > University of Oxford
>> > John Radcliffe Hospital, Headington OX3 9DU  Oxford  UK
>> >
>> > Ph: +44 (0) 1865 222 739  Fax: +44 (0) 1865 222 717
>> >
>> > ----------------------------------------------------------------
>> >
>
>