From 58e4551d3a437cce8b58ed13ae876d303c14c2a8 Mon Sep 17 00:00:00 2001 From: Blaise Li <blaise.li__git@nsup.org> Date: Mon, 8 Jul 2024 16:31:34 +0200 Subject: [PATCH] Add SBATCH env variable. This is an attempt to make it possible to run the main snakemake command using sbatch. When calling the script, the content of the SBATCH variable will be pre-pended to the main snakemake call (not the one used to generate the rulegraph). --- run_pipeline.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_pipeline.sh b/run_pipeline.sh index e028512..fa9d87f 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 -- GitLab