Commit 7a504cf6 authored by Christoph Arthofer's avatar Christoph Arthofer
Browse files

Delete cmore_mmorf.sh

parent 93a2b08c
#!/bin/bash
#$ -cwd -j y
#$ -r y
export SINGULARITY_BIND="/absolute/path/to/parent/directory/"
echo `date`: Executing task ${SGE_TASK_ID} of job ${JOB_ID} on `hostname` as user ${USER}
echo SGE_TASK_FIRST=${SGE_TASK_FIRST}, SGE_TASK_LAST=${SGE_TASK_LAST}, SGE_TASK_STEPSIZE=${SGE_TASK_STEPSIZE}
. ~/.bash_profile
. $MODULESHOME/init/bash
module load fsl/6.0.3
REF_DIR=$2
IMG_REF_ID=$3
IMG_T1_HEAD_REF_PATH="${REF_DIR}${IMG_REF_ID}_T1_head.nii.gz"
IMG_T1_BRAIN_REF_PATH="${REF_DIR}${IMG_REF_ID}_T1_brain.nii.gz"
IMG_T2_HEAD_REF_PATH="${REF_DIR}${IMG_REF_ID}_T2_head.nii.gz"
ID_PATH=$1
DATA_DIR=$5
IMG_IN_ID=$(awk 'NR=='${SGE_TASK_ID} ${ID_PATH})
IMG_T1_HEAD_IN_PATH="${DATA_DIR}${IMG_IN_ID}/T1/T1_unbiased.nii.gz"
IMG_T1_BRAIN_IN_PATH="${DATA_DIR}${IMG_IN_ID}/T1/T1_unbiased_brain.nii.gz"
IMG_T2_HEAD_IN_PATH="${DATA_DIR}${IMG_IN_ID}/T2_FLAIR/T2_FLAIR_unbiased.nii.gz"
AFFINE_DIR=$4
OMAT_T1_IN_PATH="${AFFINE_DIR}${IMG_IN_ID}_to_T1_unbiased_affine_template_MNI_T1_brain_T1reg.mat"
OMAT_T2_IN_PATH="${AFFINE_DIR}${IMG_IN_ID}_to_T1_unbiased_affine_template_MNI_T1_brain_T2reg.mat"
UNITY_REF_PATH="${FSLDIR}/etc/flirtsch/ident.mat"
OUT_DIR=$6
IMG_T1_HEAD_OUT_PATH="${OUT_DIR}${IMG_IN_ID}_to_${IMG_REF_ID}_T1.nii.gz"
IMG_T1_BRAIN_OUT_PATH="${OUT_DIR}${IMG_IN_ID}_to_${IMG_REF_ID}_T1_brain.nii.gz"
WARP_OUT="${OUT_DIR}${IMG_IN_ID}_to_${IMG_REF_ID}_warp.nii.gz"
JAC_OUT="${OUT_DIR}${IMG_IN_ID}_to_${IMG_REF_ID}_jac.nii.gz"
BIAS_OUT="${OUT_DIR}${IMG_IN_ID}_to_${IMG_REF_ID}_bias"
PARAM_PATH="${OUT_DIR}${IMG_IN_ID}_to_${IMG_REF_ID}_params.ini"
PARAM_IT_PATH=$7
singularity run --nv mmorf.sif \
--config ${PARAM_IT_PATH} \
--img_warp_space ${IMG_T1_HEAD_REF_PATH} \
--img_ref_scalar ${IMG_T1_HEAD_REF_PATH} \
--img_mov_scalar ${IMG_T1_HEAD_IN_PATH} \
--aff_ref_scalar ${UNITY_REF_PATH} \
--aff_mov_scalar ${OMAT_T1_IN_PATH} \
--mask_ref_scalar NULL \
--mask_mov_scalar NULL \
--img_ref_scalar ${IMG_T1_BRAIN_REF_PATH} \
--img_mov_scalar ${IMG_T1_BRAIN_IN_PATH} \
--aff_ref_scalar ${UNITY_REF_PATH} \
--aff_mov_scalar ${OMAT_T1_IN_PATH} \
--mask_ref_scalar NULL \
--mask_mov_scalar NULL \
--img_ref_scalar ${IMG_T2_HEAD_REF_PATH} \
--img_mov_scalar ${IMG_T2_HEAD_IN_PATH} \
--aff_ref_scalar ${UNITY_REF_PATH} \
--aff_mov_scalar ${OMAT_T2_IN_PATH} \
--mask_ref_scalar NULL \
--mask_mov_scalar NULL \
--warp_out ${WARP_OUT} \
--jac_det_out ${JAC_OUT} \
--bias_out ${BIAS_OUT}
rv=$?
echo `date`: task complete
exit $rv
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment