/
Artemis job submission examples

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

Artemis job submission examples

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. Basically, this script will just replace your subject name ‘FTD001’ and repeat the same command while only changing the subject name ‘FTD001’ for each subject. So you need to make sure your subjects are in same path, e.g. /path/to/folder/FTD####.

  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 add your subject IDs to a list.

list='FTD001 FTD002 FTD0025 FTD802 FTD1011 FTD1200'

Tip: Instead of typing each subject itself, you can use the ‘ls’ command on a folder with all your subject inside (list = ls 'nameofyoursubjectfolder').

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

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

 

Related content