Attention: Confluence is not suitable for the storage of highly confidential data. Please ensure that any data classified as Highly Protected is stored using a more secure platform.
If you have any questions, please refer to the University's data classification guide or contact ict.askcyber@sydney.edu.au

Skip to end of banner
Go to start of banner

Artemis job submission examples

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

This page will show examples of different job submissions. Please refer to official Artemis documentation on job submission if you wish to understand the basics and explanation of the commands.

Submitting a job on a single subject

Example of running recon-all on FreeSurfer on a single subject (FTD001).

  1. Save the following script as a .pbs script. (e.g. reconall.pbs)

#!/bin/bash -v
#PBS -P NeuroBMC
#PBS -N FreeSurfer_reconall
#PBS -l select=1:ncpus=4:mem=16GB
#PBS -l walltime=24:00:00
#PBS -q defaultQ

$PBS_O_WORKDIR

module load freesurfer/7.1.0
module load mrtrix3/3.0.1

cd /scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched

export SUBJECTS_DIR=/scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched

mrconvert /path/to/dicom/FTD001 /path/to/niftii/FTD001.nii -strides -1,2,3

recon-all -sd /scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched -subjid FTD001 -i /path/to/niftii/FTD001.nii -all

2. Run on Artemis by using qsub in the terminal

qsub reconall.pbs

Submitting a job on multiple subjects (in parallel)

Example of running a recon-all script on FreeSurfer across multiple subjects.

  1. Set up your folders so every subject has the same folder structure.

  2. Create a .pbs file, replacing the subject (e.g. FTD001) with ${sub}

#!/bin/bash -v
#PBS -P NeuroBMC
#PBS -N FreeSurfer_reconall
#PBS -l select=1:ncpus=4:mem=16GB
#PBS -l walltime=24:00:00
#PBS -q defaultQ

$PBS_O_WORKDIR

module load freesurfer/7.1.0
module load mrtrix3/3.0.1

cd /scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched

export SUBJECTS_DIR=/scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched

mrconvert /scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched/DICOM/${sub} /scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched/niftii/${sub}_T1w.nii -strides -1,2,3

recon-all -sd /scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched -subjid ${sub} -i /scratch/NeuroBMC/Cheng/DWI_mrtrix_longitudinal/Matched/niftii/${sub}_T1w.nii -all

3. Go to Artemis on terminal and specific what your subjects are (e.g. by labelling ‘list’).

list='FTD001 FTD002 FTD0025 FTD802 FTD1011 FTD1200'

Tip: Instead of typing each subject itself, you can do this easily by copying and pasting from the ‘ls’ command, if you list a folder with all your subjects inside.

4. Submit the jobs via a ‘for loop’ in the Artemis terminal:

for i in $list ; do qsub -v sub=$i reconall.pbs ; done

  • No labels