Papermill Slurm Job Submission#
Author: Steffen Bollmann
Tools included in this workflow#
FSL
Dataset#
Please cite the database and dataset used in your example
Output CPU information#
!cat /proc/cpuinfo | grep 'vendor' | uniq
!cat /proc/cpuinfo | grep 'model name' | uniq
vendor_id : AuthenticAMD
model name : AMD EPYC 9454 48-Core Processor
Load software tools and import python libraries#
Please have a bloc for loading the different modules needed for your example. If you can not find all the required tools in Neurodesk, feel free to add tools using the web-based GUI https://www.neurodesk.org/neurocontainers-ui/
#load FSL 6.0.4
import module
await module.load('fsl/6.0.4')
await module.list()
['julia/1.10.4',
'openssl/1.1',
'python/3.10.4-gcccore-11.3.0',
'libxslt/1.1.34-gcccore-11.3.0',
'lxml/4.9.1-gcccore-11.3.0',
'beautifulsoup/4.10.0-gcccore-11.3.0',
'jupyter-server/1.21.0-gcccore-11.3.0',
'jupyterlab/3.5.0-gcccore-11.3.0',
'fsl/6.0.4']
Data preparation#
![ -f ./mp2rage-01.nii ] && echo "$FILE exist." || wget https://imaging.org.au/uploads/Human7T/mp2rageModel_L13_work03-plus-hippocampus-7T-sym-norm-mincanon_v0.8.nii -O ./mp2rage-01.nii
![ -f ./mp2rage-02.nii ] && echo "$FILE exist." || cp ./mp2rage-01.nii ./mp2rage-02.nii
exist.
exist.
Analysis#
subject_id='01'
import subprocess
result = subprocess.run(['bet', 'mp2rage-'+subject_id+'.nii',
'mask-sub-'+subject_id+'.nii', '-R'],
capture_output=True, text=True)
Running it on the HPC#
# Save Notebook and Run this on the terminal to test
# !papermill test-analysis.ipynb papermill_output.ipynb --parameters_raw subject_id 02
# create sbat file and make sure to replace account string and and execution times and modules loaded: