Skip to content
Snippets Groups Projects
Commit 58e4551d authored by Blaise Li's avatar Blaise Li
Browse files

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).
parent e73f02c9
No related branches found
No related tags found
No related merge requests found
...@@ -114,7 +114,7 @@ megabytes_resource=$(echo "${kilobytes_tot} / 1100" | bc) ...@@ -114,7 +114,7 @@ megabytes_resource=$(echo "${kilobytes_tot} / 1100" | bc)
from_dir=$(pwd) from_dir=$(pwd)
#cmd="(cd ${output_dir}; snakemake -s ${snakefile} --configfile ${config_base} --resources mem_mb=${megabytes_resource} $@)" #cmd="(cd ${output_dir}; snakemake -s ${snakefile} --configfile ${config_base} --resources mem_mb=${megabytes_resource} $@)"
# TODO: check that this works # 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 echo ${cmd} | tee -a ${log_base}.log
# https://unix.stackexchange.com/a/245610/55127 # https://unix.stackexchange.com/a/245610/55127
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment