Thanks Mark, problem is solved!
On 17/04/13 8:49 PM, "Mark Jenkinson" <[log in to unmask]> wrote:
>Dear Kristi,
>
>If you unset your SGE_ROOT variable then you should be able to run any
>FSL command in exactly the same way as on the cluster, but it will just
>run serially on the local machine instead. So no need for other scripts.
>
>All the best,
> Mark
>
>
>Kristi Griffiths <[log in to unmask]> wrote:
>
>
>Dear experts,
>
>My lab has recently been having trouble with the queuing system on our
>SGE, so I need to run some bedpostX jobs manually, bypassing SGE. I
>found a script on these forums that seems to do this (see below) but I
>have 2 concerns. Firstly, I'm not sure if any important updates have
>been incorporated since this script was written. All of my bedpostX to
>this point has been done using version 5.0.1. Secondly, I need to run my
>jobs with 3 fibre directions (rather than the default of 2). When I
>changed this in the script and tried running it, it only produced 1fibre
>direction.
>
>Is anyone able to help me overcome this problem? Or provide an up to date
>bedpostX script?
>
>Many thanks,
>Kristi
>
>make_absolute(){
> dir=$1;
> if [ -d ${dir} ]; then
> OLDWD=`pwd`
> cd ${dir}
> dir_all=`pwd`
> cd $OLDWD
> else
> dir_all=${dir}
> fi
> echo ${dir_all}
>}
>
>[ "$1" = "" ] && Usage
>
>subjdir=`make_absolute $1`
>subjdir=`echo $subjdir | sed 's/\/$/$/g'`
>
>echo subjectdir is $subjdir
>
>#parse option arguments
>nfibres=3
>fudge=1
>burnin=1000
>njumps=1250
>sampleevery=25
>model=1
>while [ ! -z "$2" ]
>do
> case "$2" in
> -n) nfibres=$3;shift;;
> -w) fudge=$3;shift;;
> -b) burnin=$3;shift;;
> -j) njumps=$3;shift;;
> -s) sampleevery=$3;shift;;
> -model) model=$3;shift;;
> *) break;;
> esac
> shift
>done
>
>#check that all required files exist
>
>if [ ! -d $subjdir ]; then
> echo "subject directory $1 not found"
> exit 1
>fi
>
>if [ ! -e ${subjdir}/bvecs ]; then
> echo "${subjdir}/bvecs not found"
> exit 1
>fi
>
>if [ ! -e ${subjdir}/bvals ]; then
> echo "${subjdir}/bvals not found"
> exit 1
>fi
>
>if [ `${FSLDIR}/bin/imtest ${subjdir}/data` -eq 0 ]; then
> echo "${subjdir}/data not found"
> exit 1
>fi
>
>if [ `${FSLDIR}/bin/imtest ${subjdir}/nodif_brain_mask` -eq 0 ]; then
> echo "${subjdir}/nodif_brain_mask not found"
> exit 1
>fi
>
>date
>echo Making bedpostx directory structure
>
>mkdir -p ${subjdir}.bedpostX/
>mkdir -p ${subjdir}.bedpostX/diff_slices
>mkdir -p ${subjdir}.bedpostX/logs
>mkdir -p ${subjdir}.bedpostX/logs/pid_${$}
>mkdir -p ${subjdir}.bedpostX/xfms
>
>date
>echo Preprocessing stages
>${FSLDIR}/bin/bedpostx_preproc.sh ${subjdir}
>
>date
>echo Parallel processing stage
>nslices=`${FSLDIR}/bin/fslval ${subjdir}/data dim3`
>slice=0
>while [ $slice -lt $nslices ]
>do
> echo -n slice $slice/$nslices" "; date
> ${FSLDIR}/bin/bedpostx_single_slice.sh $subjdir $nfibres $fudge
>$burnin $njumps $sampleevery $model $slice
> slice=$(($slice + 1))
>done
>
>echo date
>echo Post processing stage
>${FSLDIR}/bin/bedpostx_postproc.sh $subjdir
>
>echo date
>echo Finished.
|