GOT IT! I followed the last advice and ran it all the way through up to and including the dual_regression step.
Thanks a lot for the help and the very nice software!
Cheers,
Koene
On Fri, 9 Mar 2012 15:36:18 +0000, Stephen Smith <[log in to unmask]> wrote:
>Use the Glm GUI to setup the group model you want (even if it's just a single-group t-test) and then when you *SAVE* this design to file, you will get the design.mat and design.con files outputted to file.
>
>Cheers.
>
>
>On 9 Mar 2012, at 15:34, Koene Van Dijk wrote:
>
>> Yes, indeed: I have seen that the <design.mat> and <design.con> files are part of the second step and that I can use Glm to create these files.
>>
>> I am, however, sorry to have to say that I'm still in the dark as to HOW I should use Glm (or Glm_gui) to create the <design.mat> and <design.con> files.
>>
>> So I already ran:
>> melodic -i list_of_six_4D_fMRI_datasets.txt --report -v --tr=5 --Oall -o output.ica -a concat
>>
>> and my goal is to use the dual-regression script to regress the group-level maps into the individual runs original individual runs, and from there can go on to cleanup the individual runs.
>>
>> I would appreciate it immensely if I can get some instructions on how to do this. I would prefer to remain working on my linux box and know that I can call the Glm gui: fsl/current/bin/Glm
>>
>> Thanks!
>> Koene
>>
>>
>>
>> On Fri, 9 Mar 2012 08:06:14 +0000, Stephen Smith <[log in to unmask]> wrote:
>>
>>> Hi - for the design.mat and design.con files, this is the second step on the dualreg web page - for example, use the Glm (Glm_gui on Mac) GUI to create these.
>>> Cheers.
>>>
>>>
>>> On 8 Mar 2012, at 19:30, Koene Van Dijk wrote:
>>>
>>>> Hi,
>>>>
>>>> I've tried to follow Matt's suggestion: first concatenate my 6 runs that I have of the same subject and feed that as a single 4D file into melodic. I used fslmerge -t (etc) and then ran melodic on that single file but got strange results: I got --using the automated dimension estimation-- 231 components instead of the nice 25 that I got when I fed in the 6 runs separately using a text file with the "concat" or "tica" options.
>>>>
>>>> Alternatively, I would not mind if I can just keep working in my stream where I feed in 6 runs separately in with the "concat" flag, and go for the dual regression approach as Steve suggested (below).
>>>>
>>>> Steve wrote: "use dual-regression to regress the group-level maps into the individual subject's original datasets"
>>>>
>>>> I have not yet used the dual regression script. I read this:
>>>> ---------------------
>>>> 1. Run Melodic on your group data in Concat-ICA mode ("Multi-session temporal concatenation"). Let's assume that the group-level output directory from this is called groupICA.gica
>>>>
>>>> 2. Use Glm (or any other method) to create your multi-subject design matrix and contrast files.
>>>>
>>>> 3. Run dual_regression. Just type the script name to get the usage - should be mostly self-explanatory
>>>>
>>>> (source: http://www.fmrib.ox.ac.uk/analysis/dualreg/)
>>>> ---------------------
>>>>
>>>> Step 1 is done. I believe I get step 3 if I only have <design.mat> and <design.con>.
>>>>
>>>> So my question now is:
>>>> Where do I get, or how do I make, the <design.mat> and <design.con> files?
>>>>
>>>> (after that I will use the "dr_stage1_subject000*.txt files as the -d input to fsl_regfilt" as I understood from the message by Steve Mayhew)
>>>>
>>>> Thanks again for any suggestions!
>>>>
>>>> -Koene
>>>>
>>>> PS: Steve: I assumed that when I fed several runs into melodic using a text file and I did not specify the "approach", the program would take tica by default. I've tried both tica and concat now, and they give quite similar results -- but I will continue with the "concat" version as suggested.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, 8 Mar 2012 14:25:43 +0000, Stephen Smith <[log in to unmask]> wrote:
>>>>
>>>>> Hi - that's nearly what I was going to start by saying: Koene's first call to melodic looks weird - you pass in a text file of multiple inputs, but don't specify whether to use the concat or tensor group-level approach - so I'm not even sure what melodic will do in this case. I would recommend just using the -a concat option, which is nearly what Matt suggested, but not quite.
>>>>>
>>>>> THEN, you use dual-regression regress the group-level maps into the individual subject's original datasets, and from there can go on to (eg) cleanup those individual datasets on the basis of the outputs of that. http://www.fmrib.ox.ac.uk/analysis/dualreg/
>>>>>
>>>>> Cheers.
>>>>>
>>>>>
>>>>> On 7 Mar 2012, at 14:49, Matt Glasser wrote:
>>>>>
>>>>>> It might be better to concatenate the data first in a single 4D file before
>>>>>> running melodic, as this isn't really "group" ICA. Then fsl_regfilt would
>>>>>> run properly on the output melodic_mix when you specify the components.
>>>>>>
>>>>>> Peace,
>>>>>>
>>>>>> Matt.
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf
>>>>>> Of Koene Van Dijk
>>>>>> Sent: Tuesday, March 06, 2012 9:24 PM
>>>>>> To: [log in to unmask]
>>>>>> Subject: [FSL] UPDATE: Applying fsl_regfilt after melodic to denoise the
>>>>>> several 4D datasets.
>>>>>>
>>>>>> In the meantime I have learned a little bit more about my melodic output.
>>>>>> Let me update my questions that I submitted yesterday:
>>>>>>
>>>>>> If I run this command:
>>>>>> melodic -i list_of_4D_fMRI_datasets.txt --report -v --tr=5 --Oall -o
>>>>>> output.ica
>>>>>>
>>>>>> ...on 1 BOLD run of 90 volumes I get a file for the first component with 1
>>>>>> column with 90 entries:
>>>>>> ./output.ica/report/t1.txt
>>>>>>
>>>>>> If I run the same command but include 2 BOLD runs with each 90 volumes (i.e.
>>>>>> 180 volumes) I will get a total of 3 columns in the "t1.txt" file. I see
>>>>>> that the number of columns is always: number of bold runs + 1.
>>>>>>
>>>>>> I guess that there is one column for the time course of the respective
>>>>>> component for each run + one summary measure or so. I tried it with flag
>>>>>> "-a" set to default (=tica) and with concat which gave the same file
>>>>>> structure.
>>>>>>
>>>>>> Can somebody tell me which column is which?
>>>>>>
>>>>>> And what the +1 column represents?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Koene Van Dijk
>>>>>>
>>>>>> PS: Here are the first 10 lines of such a file when I used two bold runs as
>>>>>> input (using tica)
>>>>>>
>>>>>> head /output.ica/report/t1.txt
>>>>>> 1.86719 1.90851 1.75934
>>>>>> 1.72553 1.74516 1.6743
>>>>>> 2.00228 1.65566 2.90701
>>>>>> 1.71611 1.65537 1.87466
>>>>>> 1.68615 1.71394 1.61362
>>>>>> 1.61661 1.36676 2.26876
>>>>>> 1.43963 1.50949 1.2573
>>>>>> 1.88293 1.77197 2.17257
>>>>>> 1.3938 1.35532 1.49425
>>>>>> 1.3309 1.58513 0.667326
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, 5 Mar 2012 17:18:27 +0000, Koene Van Dijk <[log in to unmask]>
>>>>>> wrote:
>>>>>>
>>>>>>> Dear all,
>>>>>>>
>>>>>>> I am using melodic on a single subject. I have multiple runs of resting
>>>>>> state fMRI: 6 runs of 90 volumes each, i.e 540 volumes in total. I have
>>>>>> already performed slice-timing correction and motion correction (all 539
>>>>>> volumes were registered to the first volume of the first run).
>>>>>>>
>>>>>>> This is what I ran on my linux box using fsl 4.1.9 (64-bit):
>>>>>>> melodic -i list_of_five_4D_fMRI_datasets.txt --report -v --tr=5 --Oall -o
>>>>>> output.ica
>>>>>>>
>>>>>>> It gives 25 components with beautiful maps. I now would like to remove some
>>>>>> obvious noise components from the 4D data set and save the residual as new
>>>>>> 4D dataset for other analyses.
>>>>>>>
>>>>>>> On the following website I read about using fsl_regfilt:
>>>>>>> http://www.fmrib.ox.ac.uk/fslcourse/lectures/practicals/melodic/index.htm#d
>>>>>> enoising
>>>>>>>
>>>>>>> And I tried this to remove components 1,2 and 3:
>>>>>>> fsl_regfilt -i list_of_five_4D_fMRI_datasets.txt -d
>>>>>> ./output.ica/melodic_mix -o denoise_ICAfiltered -f "1,2,3"
>>>>>>>
>>>>>>> This does not work: "ERROR: cannot read input image".
>>>>>>>
>>>>>>> So you can see that I entered my "list_of_five_4D_fMRI_datasets.txt" that I
>>>>>> also used for the initial melodic command. I guess fsl_regfilt is not
>>>>>> designed to take a list as input files, as melodic is.
>>>>>>>
>>>>>>> My first question is:
>>>>>>> 1) Would anyone have a suggestion for how I can remove some components from
>>>>>> this dataset using fsl_regfilt?
>>>>>>>
>>>>>>>
>>>>>>> If I would like to regress out the components with another tool (any glm
>>>>>> tool that allows me to save the 6 residual 4D fMRI runs), I would need to
>>>>>> input the time course of the components. For example component 1, I found a
>>>>>> text file here:
>>>>>>> ./output.ica/report/t1.txt
>>>>>>>
>>>>>>> This file contains 90 rows and 7 columns. This surprised me because I was
>>>>>> expecting to find 90 x 6 (=540) and not 90 x 7 (=630) values to represent
>>>>>> the time course of component 1.
>>>>>>>
>>>>>>> So my next questions are:
>>>>>>>
>>>>>>> 2. Why are there 90 x 7 columns and not 90 x 6?
>>>>>>>
>>>>>>> 3. Which time course would you recommend I take to use as regressor of
>>>>>> no-interest if I would want to regress out a noise component?
>>>>>>>
>>>>>>>
>>>>>>> Thanks a lot for any advice!
>>>>>>>
>>>>>>> Best regards,
>>>>>>>
>>>>>>> Koene
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------------
>>>>> 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
>>>>> ---------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------------
>>> 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
>>> ---------------------------------------------------------------------------
>>>
>>>
>>>
>>>
>>
>
>
>---------------------------------------------------------------------------
>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
>---------------------------------------------------------------------------
>
>
>
>
|