diff --git a/run_pipeline.sh b/run_pipeline.sh
index e0285127a8db4fb84dc0d2b57588bad098d2c7de..fa9d87f1643a9e8d96c1bd58319f54acd4ecf8ce 100755
--- a/run_pipeline.sh
+++ b/run_pipeline.sh
@@ -114,7 +114,7 @@ megabytes_resource=$(echo "${kilobytes_tot} / 1100" | bc)
 from_dir=$(pwd)
 #cmd="(cd ${output_dir}; snakemake -s ${snakefile} --configfile ${config_base} --resources mem_mb=${megabytes_resource} $@)"
 # TODO: check that this works
-cmd="(cd ${output_dir}; echo ${USER}@${HOSTNAME}:${from_dir}/${output_dir} > pwd.txt; snakemake -s ${snakefile_base} --configfile ${config_base} --rulegraph | dot -Tpdf > rulegraph.pdf; snakemake -s ${snakefile_base} --configfile ${config_base} --resources mem_mb=${megabytes_resource} $@)"
+cmd="(cd ${output_dir}; echo ${USER}@${HOSTNAME}:${from_dir}/${output_dir} > pwd.txt; snakemake -s ${snakefile_base} --configfile ${config_base} --rulegraph | dot -Tpdf > rulegraph.pdf; ${SBATCH} snakemake -s ${snakefile_base} --configfile ${config_base} --resources mem_mb=${megabytes_resource} $@)"
 
 echo ${cmd} | tee -a ${log_base}.log
 # https://unix.stackexchange.com/a/245610/55127