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
 Cluster Support
 FSLVBM
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

djt11
New Member

USA
19 Posts

Posted - Feb 24 2011 :  1:45:51 PM  Show Profile  Reply with Quote
Hi,

I am new to working on the BIAC cluster. I was wondering how can I access FSL commands using the cluster.

Thanks
Dipti

petty
BIAC Staff

USA
453 Posts

Posted - Feb 24 2011 :  1:59:24 PM  Show Profile  Reply with Quote
There's a lot of info on the wiki:
http://fourier.biac.duke.edu/wiki/doku.php/biac:cluster

And if you are interested in running interactively, follow the interactive directions:
http://fourier.biac.duke.edu/wiki/doku.php/biac:cluster:interactive
Go to Top of Page

djt11
New Member

USA
19 Posts

Posted - Feb 28 2011 :  11:36:16 AM  Show Profile  Reply with Quote
Can someone help me to write a qsub script for FSLVBM
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Feb 28 2011 :  11:45:46 AM  Show Profile  Reply with Quote
You could use the following script.

This however assumes that you've already set-up your data in the proper way per the fsl website:
http://www.fmrib.ox.ac.uk/fsl/fslvbm/index.html

And secondly, that you've created for model for randomize correctly.

You'd just need to run this submission script and comment out which step of randomize you'd like to run on the script submission.
The 5 steps being one of the following:
tbss_1_preproc
fslvbm_1_bet
fslvbm_2_template
fslvbm_3_proc
randomise





#!/bin/sh

# --- BEGIN GLOBAL DIRECTIVE --
#$ -S /bin/sh
#$ -o $HOME/$JOB_NAME.$JOB_ID.out
#$ -e $HOME/$JOB_NAME.$JOB_ID.out
#$ -m ea
# -- END GLOBAL DIRECTIVE --

# -- BEGIN PRE-USER --
#Name of experiment whose data you want to access
EXPERIMENT=${EXPERIMENT:?"Experiment not provided"}

EXPERIMENT=`biacmount $EXPERIMENT`
EXPERIMENT=${EXPERIMENT:?"Returned NULL Experiment"}

if [ $EXPERIMENT = "ERROR" ]
then
        exit 32
else
#Timestamp
echo "----JOB [$JOB_NAME.$JOB_ID] START [`date`] on HOST [$HOSTNAME]----"
# -- END PRE-USER --
# **********************************************************

# -- BEGIN USER DIRECTIVE --
# Send notifications to the following address
#$ -M someone@somewhere.edu

# -- END USER DIRECTIVE --

# -- BEGIN USER SCRIPT --


RAWDIR=${EXPERIMENT}/Analysis/fslvbm_group/sero

cd $RAWDIR
#tbss_1_preproc -f 2.44 *.nii.gz
#fslvbm_1_bet -N -f 0.3
#fslvbm_2_template -a
#fslvbm_3_proc
#randomise -i GM_mod_merg_s3.5 -m GM_mask -o myfinalresults -d model/design.mat -t model/design.con -c 2.3 -n 5000 -V



# -- END USER SCRIPT -- #

# **********************************************************
# -- BEGIN POST-USER --
echo "----JOB [$JOB_NAME.$JOB_ID] STOP [`date`]----"
OUTDIR=${OUTDIR:-$EXPERIMENT/Analysis/}
mv $HOME/$JOB_NAME.$JOB_ID.out $OUTDIR/$JOB_NAME.$JOB_ID.out
RETURNCODE=${RETURNCODE:-0}
exit $RETURNCODE
fi
# -- END POST USER--

Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Feb 28 2011 :  11:47:17 AM  Show Profile  Reply with Quote
With the above just posted .. i would suggest running fslvbm through and interactive job as described on the fslvbm page to get an idea of what is happening ( or needs to happen ) before trying to submit these as batch processing jobs.
Go to Top of Page

djt11
New Member

USA
19 Posts

Posted - Feb 28 2011 :  1:46:31 PM  Show Profile  Reply with Quote
Thanks a million for that though. Another quick question, my data for fslvbm is located /Munin/Lewis/FSE.01/Data/FSLVBM28022011 how do I point the script to this directory so that it can start accessing files from here to work on
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Feb 28 2011 :  2:08:33 PM  Show Profile  Reply with Quote

in the script, raw data directory would be set as follows: RAWDIR=${EXPERIMENT}/Data/FSLVBM28022011

Also, when you submit the script you have to tell it which experiment you are mounting ( qsub -v EXPERIMENT=FSE.01 scriptName.sh )

The script will get the path ( stored as ${EXPERIMENT} ) from this after a successful mount. Therefore, your RAWDIR would be the full path up to your data directory.


Go to Top of Page

djt11
New Member

USA
19 Posts

Posted - Mar 01 2011 :  09:18:36 AM  Show Profile  Reply with Quote
So when I try to mount the experiment using qsub command it does not run and the output file is empty.Can u suggest why this is happening
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Mar 01 2011 :  09:33:30 AM  Show Profile  Reply with Quote
just looked at your script and your rawdirectory is wrong, and there may be some window's characters in your script, and you've replaced an important line with a variable that you shouldn't touch.

1) RAWDIR=${EXPERIMENT} /Munin/Lewis//FSE.01/Data/FSLVBM28022011
- When we return a mount to you, EXPERIMENT will be the fill path up to your FSE directory. so rawdir only needs to be ${EXPERIMENT}/Data/FSLVBM28022011

2) if you ever edit these scripts in windows run dos2unix on them on the head node before trying to run the script

3) EXPERIMENT=$FSLVBM{EXPERIMENT:?"Experiment not provided"}
- never touch that line, it should remain EXPERIMENT=${EXPERIMENT:?"Experiment not provided"}

You shouldn't need to edit anything above the line " # -- BEGIN USER SCRIPT -- "


Edited by - petty on Mar 01 2011 09:34:33 AM
Go to Top of Page

djt11
New Member

USA
19 Posts

Posted - Mar 01 2011 :  09:45:23 AM  Show Profile  Reply with Quote
Thanks for the help and inputs. I made the changes you suggested, and now when I run, qsub, i am getting an error
"/opt/gridengine/hugin/spool/node28/job_scripts/887101: line 12: EXPERIMENT: Experiment not provided"
Could you help me with the same

Thanks
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Mar 01 2011 :  09:54:20 AM  Show Profile  Reply with Quote
when you submit the script you have to include the experiment like this:

qsub -v EXPERIMENT=FSE.01 fslvbm.sh
Go to Top of Page

djt11
New Member

USA
19 Posts

Posted - Mar 01 2011 :  10:40:31 AM  Show Profile  Reply with Quote
I did that... it worked for the second time... Thanks though..
I have another question, now when i run qsub, it gives no outputfiles and no log files also.
The output files will be stored in the same directory as the input ?
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Mar 01 2011 :  10:50:09 AM  Show Profile  Reply with Quote
your output files default to here: $EXPERIMENT/Analysis

if you want them to go somewhere else create a variable OUTDIR and they will go there instead ( OUTDIR=$RAWDIR would put them where your inputs are )
Go to Top of Page

djt11
New Member

USA
19 Posts

Posted - Mar 01 2011 :  10:58:24 AM  Show Profile  Reply with Quote
I got a text file stating "----JOB [fslvbm.sh.887111] START [Tue Mar 1 10:32:04 EST 2011] on HOST [node17]----
----JOB [fslvbm.sh.887111] STOP [Tue Mar 1 10:32:04 EST 2011]----"
It probably didnt do any processing? Is something wrong with the script or the data?
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - Mar 01 2011 :  11:06:06 AM  Show Profile  Reply with Quote
all the processing has been commented out in the script ... please re-read my 2nd post. You need to uncomment the step you want to perform.
Go to Top of Page

djt11
New Member

USA
19 Posts

Posted - Mar 01 2011 :  11:10:56 AM  Show Profile  Reply with Quote
Sorry about that. Thank you so much for all the help. Really Appreciate it
Thanks
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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.45 seconds. Snitz Forums 2000