Print

Print


Hi,

If you write 'program' do you mena feat or your script that midifies the 
fsf-files?
There might be a general problem, if you specify regressors in the 
one-column text format, because this might need the same number of time 
points as given in the fsf-file. I use the three-column text format and 
it is working fine. So this might be a cause of trouble.

The script I send in a previosus post assumes that there is a fsf-file 
($cfl) with a number of volumes specified. It determines the current 
functional data set ($dtfl) and its number of volumes (vol=`fslnvols 
$dtfl`), greps the current line of volumes from the fsf-file and 
replaces it with the new number if different.
The code provided by Martin Monti assumes that your fsf-files uses 
'###SUB###' and  '###VOL###' as place holder for the entries and 
replaces these with valid values as determined bevore the sed call. So 
for this option you need to write set fmri(npts) ###VOL###' in your 
template fsf file.

Hope this helps a bit,,,

good luck
wolf


Courtney Haswell wrote:
> I could not get the program to determine the number of timepoints 
> while executing Feat. Do you just leave the number of volumes as 0 on 
> the .fsf? I always get the error for prestats that "Error - 
> prefiltered_func_data has a different number of time points to that in 
> FEAT setup" if I do not have the exact number of volumes selected in 
> my feat file.  
> I would be interested in just letting the program determine the number 
> of volumes but I could not get it to work that way.
>
> On Fri, Nov 5, 2010 at 3:37 AM, Xue, Feng <[log in to unmask] 
> <mailto:[log in to unmask]>> wrote:
>
>     Dear folks,
>
>     Yes, we absolutely could do in this way, however, I wonder is there
>     any particular reason to set npts in fsf script? Why not let the
>     program to determind it when exectuting?
>
>     On Thu, Nov 4, 2010 at 11:44 PM, Courtney Haswell
>     <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>     > Thanks everyone, I got it working. I was having issues with the
>     Feat GUI
>     > allowing me to enter a variable for Total Volumes but I just
>     edited the .fsf
>     > file in a text editor to add the variable.
>     >
>     > This is my script in case it will help anyone else in the future:
>     > for runs in 1 2 3 4 5 6 7 8; do
>     > ANATFILE=$RAWDIR/T1_brain
>     > RUNDIR=$RAWDIR/run${runs}
>     > OUTPUTDIR=$FSLDATADIR/run${runs}
>     > BEHAVDIR=$FSLDATADIR/behavioral/run${runs}
>     > VOL_TIMEPT=`ls -l $FUNCDIR/run006_0${runs}/*.img | wc -l`
>     > for i in 'FEAT_template_evst.fsf'; do
>     > sed -e 's@OUTPUT@'$OUTPUTDIR'@g' \
>     >  -e 's@ANAT@'$ANATFILE'@g' \
>     >  -e 's@VOLPOINTS@'$VOL_TIMEPT'@g' \
>     >   -e 's@RUNDIR@'$RUNDIR'@g' <$i> $FSLDATADIR/FEAT_run${runs}.fsf
>     > done
>     > feat $FSLDATADIR/FEAT_run${runs}.fsf
>     > ##############
>     > done
>     >
>     > On Thu, Nov 4, 2010 at 11:14 AM, Martin M Monti
>     <[log in to unmask] <mailto:[log in to unmask]>>
>     > wrote:
>     >>
>     >> Hi Courtney,
>     >>
>     >>  if you look back in the archive there are a couple of posts on
>     the topic.
>     >> What you want to do is to write a 'sample" script, which you
>     can do from the
>     >> GUI, then open it and replace all the important variables of
>     the .fsf file
>     >> you want to change with something unique and easy to spot
>     (say.. ###SUB###
>     >> for the subject name, ###VOL###, etc). This will now be your
>     "master fsf
>     >> copy"
>     >> Then, the following shows how to create a .fsf file for each
>     subject,
>     >> changing the values that you have set into a "variable" (for
>     example, the
>     >> SubjectName and the TRNumber)
>     >>
>     >> foreach sub (sub1 sub2 sub3)            #subject loop
>     >> set nvols = `fslnvols ${sub}_run1.*` #pull out the TRs for each sub
>     >> echo $sub $nvols                                #tell me
>     subject and TR
>     >> number
>     >> #Replace values and put in sub's directory
>     >> sed -e "s/###SUB###/${sub}/g" \
>     >>       -e "s/###VOL###/${nvols}/g" \
>     >>        Run1_Sample.fsf > /imaging/mm03/LingMath/FSL/${sub}/run1.fsf
>     >> end
>     >>
>     >> then you can just make a loop to launch the feat analysis from
>     the shell
>     >>
>     >> Cheers
>     >>
>     >>  Martin
>     >>
>     >> On 04/11/10 13:24, Courtney Haswell wrote:
>     >>>
>     >>> Hi FSL users,
>     >>>
>     >>> For fMRI analysis, I use a Feat template and the sed command
>     to create
>     >>> all of my .fsf files. I have a bit of a problem now in that
>     all of the runs
>     >>> and paradigms have a different number of timepoints, so
>     therefore a
>     >>> different number of total volumes in each run for each
>     subject. Is there a
>     >>> way to change the total number of volumes through scripting in
>     the .fsf file
>     >>> after it has been created before I run "feat" on it? It will
>     not allow me to
>     >>> enter a variable for "Total Volumes" only a number. I would
>     prefer not to
>     >>> have to create the .fsf files manually for every run of every
>     subject.
>     >>>
>     >>> Thank you,
>     >>> Courtney
>     >>>
>     >
>     >
>
>
>
>     --
>     Best Regards
>
>     Xue, Feng Ph.D.
>     Major in Developmental Cognitive Neuroscience
>
>     National Key Laboratory of Cognitive Neuroscience and Learning
>     Beijing Normal University
>     Beijing, China. 100875
>     Tel: +86-13810154455
>     web: http://psychbrain.bnu.edu.cn <http://psychbrain.bnu.edu.cn/>
>     ==============================================
>     Welcome to MuDuo JinSheng BBS @ Beijing Normal University
>     telnet://bbs.mdjs.org <http://bbs.mdjs.org/>
>     http://bbs.mdjs.org <http://bbs.mdjs.org/>
>
>