| Author |
Topic  |
|
djt11
New Member

USA
19 Posts |
Posted - Feb 24 2011 : 1:45:51 PM
|
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 |
|
|
djt11
New Member

USA
19 Posts |
Posted - Feb 28 2011 : 11:36:16 AM
|
| Can someone help me to write a qsub script for FSLVBM |
 |
|
|
petty
BIAC Staff
    
USA
453 Posts |
Posted - Feb 28 2011 : 11:45:46 AM
|
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--
|
 |
|
|
petty
BIAC Staff
    
USA
453 Posts |
Posted - Feb 28 2011 : 11:47:17 AM
|
| 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. |
 |
|
|
djt11
New Member

USA
19 Posts |
Posted - Feb 28 2011 : 1:46:31 PM
|
| 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 |
 |
|
|
petty
BIAC Staff
    
USA
453 Posts |
Posted - Feb 28 2011 : 2:08:33 PM
|
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.
|
 |
|
|
djt11
New Member

USA
19 Posts |
Posted - Mar 01 2011 : 09:18:36 AM
|
| 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 |
 |
|
|
petty
BIAC Staff
    
USA
453 Posts |
Posted - Mar 01 2011 : 09:33:30 AM
|
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 |
 |
|
|
djt11
New Member

USA
19 Posts |
Posted - Mar 01 2011 : 09:45:23 AM
|
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 |
 |
|
|
petty
BIAC Staff
    
USA
453 Posts |
Posted - Mar 01 2011 : 09:54:20 AM
|
when you submit the script you have to include the experiment like this:
qsub -v EXPERIMENT=FSE.01 fslvbm.sh |
 |
|
|
djt11
New Member

USA
19 Posts |
Posted - Mar 01 2011 : 10:40:31 AM
|
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 ?
|
 |
|
|
petty
BIAC Staff
    
USA
453 Posts |
Posted - Mar 01 2011 : 10:50:09 AM
|
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 ) |
 |
|
|
djt11
New Member

USA
19 Posts |
Posted - Mar 01 2011 : 10:58:24 AM
|
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? |
 |
|
|
petty
BIAC Staff
    
USA
453 Posts |
Posted - Mar 01 2011 : 11:06:06 AM
|
| 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. |
 |
|
|
djt11
New Member

USA
19 Posts |
Posted - Mar 01 2011 : 11:10:56 AM
|
Sorry about that. Thank you so much for all the help. Really Appreciate it Thanks |
 |
|
Topic  |
|