Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Analysis Software Support
 feat automation with template
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ch186
New Member

20 Posts

Posted - Feb 02 2011 :  09:11:11 AM  Show Profile  Reply with Quote
Hi!!

I have a slight issue when I try to run feat on all of my subjects after running a feat_template creation script.

for i in 'FEAT_template.fsf'; do
sed -e 's@FUNC@'$RUNDIR/filtered_func_data.nii'@g' \
 -e 's@OUTDIR@'$OUTPUTDIR'@g' \
 -e 's@BEHAV@'$BEHAVDIR'@g' \
 -e 's@ANAT@'$ANATFILE'@g' <$i> $PPIDIR/FEAT_run${runs}_plus_emo_neu_vmPFC.fsf
done
feat $PPIDIR/FEAT_run${runs}_plus_emo_neu_vmPFC.fsf

If I run a script that uses that code to run through each run for each subject and make a .fsf file, when I run "feat" only a design.fsf and a design.con file are created in the feat folder along with some other folders but it never makes a stats folder. If I change the code to be
Feat $PPIDIR/FEAT_run_etc
and I save the file manually, feat will run fine. Does anyone else have this issue?

When I run save the FEAT_run_etc file manually, all of the .con, .fsf, .min etc are created and then feat can run easily. It is time consuming to save 40 subjects with 8 runs each manually. Anyone have any ideas what is going on? Thanks.

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Feb 02 2011 :  09:24:31 AM  Show Profile  Reply with Quote
It's hard to know for sure without seeing the actual .fsf file, but you are using a variable ${runs} inside and outside the loop and I'm not sure what it refers to. Is this (below) what you were going for?

for run in 1 2 3 4 5 6 ; do
  sed -e 's@FUNC@'$RUNDIR/filtered_func_data.nii'@g' \
   -e 's@OUTDIR@'$OUTPUTDIR'@g' \
   -e 's@BEHAV@'$BEHAVDIR'@g' \
   -e 's@ANAT@'$ANATFILE'@g' < FEAT_template.fsf  > $PPIDIR/FEAT_run${run}_plus_emo_neu_vmPFC.fsf
  feat $PPIDIR/FEAT_run${run}_plus_emo_neu_vmPFC.fsf
done
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Feb 02 2011 :  09:58:44 AM  Show Profile  Reply with Quote
also, make sure that you are using the same versions of feat within your script as you are through the GUI.

If you've set the default version of FSL to be different than the one automatically loaded on login, you'll want to call feat with the full path name.
ie: $FSLDIR/bin/feat

Different versions of feat can't necessarily run each other's .fsf files.
Go to Top of Page

ch186
New Member

20 Posts

Posted - Feb 02 2011 :  1:28:45 PM  Show Profile  Reply with Quote
Thanks for the replies.
Syam: Yeah I left the rest of the code out but here is the whole script:
#!/bin/bash

export FSLDIR=/usr/local/packages/fsl
. ${FSLDIR}/etc/fslconf/fsl.sh

echo "starting at" $(date)

SUBJ=$1

FSLDATADIR=~/net/tulving/data/MIRECC.02/Analysis/FSL/$SUBJ

#### creates fsf and runs feat for each run ###

for runs in 01 02 03 04 05 06 07 08; do #02 03 04 05 06 07 08

ANATFILE=$FSLDATADIR/T1_0001_brain.nii
RUNDIR=$FSLDATADIR/run${runs}.feat
PPIDIR=$FSLDATADIR/PPI/run${runs}
BEHAVDIR=$FSLDATADIR/behavioral/run${runs}
OUTPUTDIR=$PPIDIR/testing_new

mkdir -p $PPIDIR


for i in 'new_template.fsf'; do
sed -e 's@FUNC@'$RUNDIR/filtered_func_data.nii'@g' \
 -e 's@OUTDIR@'$OUTPUTDIR'@g' \
 -e 's@BEHAV@'$BEHAVDIR'@g' \
 -e 's@ANAT@'$ANATFILE'@g' <$i> $PPIDIR/FEAT_run${runs}_test.fsf
done

$FSLDIR/bin/feat $PPIDIR/FEAT_run${runs}_test.fsf
done

echo "ending at" $(date)


I think it might have something to do with older versions of feat. I tried creating a new template.fsf from scratch instead of using one that was created 1.5 years ago. It still doesn't make all of the files. Is it possible that since I am just doing "Stats + Poststats" and calling filtered_func_data.nii that was created 1.5 years ago that something isn't compatible? I was thinking to try doing the whole Full Analysis and seeing if that would change anything.

Chris: I added in trying to call feat with $FSLDIR/bin/feat but it didn't change anything. I could send the .fsf template if it would help.

Thanks!
Go to Top of Page

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Feb 02 2011 :  1:44:25 PM  Show Profile  Reply with Quote
Is there any log file in the output directory with any errors in it? It is definitely possible that newer versions of feat will not work as well with lower-level outputs of older versions of feat. But the fact that you could run it sucessfully explicitly (with Feat) suggests that something else is going on.
Go to Top of Page

ch186
New Member

20 Posts

Posted - Feb 02 2011 :  2:24:45 PM  Show Profile  Reply with Quote
I tired running a full analysis from the raw data and that still didn't work. The errors that I get are:
feat0
feat1
feat2_pre
feat2_pre.e2509
feat2_pre.o2509
feat3_film
feat3_film.e2574
feat3_film.o2574
feat4_post
feat4_post.e2634
feat4_post.e2932
feat4_post.o2634
feat4_post.o2932
feat5_reg
feat5_reg.e2670
feat5_reg.o2670
feat5_stop.e2957
feat5_stop.o2957
feat9

When I actually open the .fsf created explicitly versus opening the one that was created in the script, I don't see any difference inside. Syam, I am emailing you the log files in a zip.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.55 seconds. Snitz Forums 2000