Commit bd865854 authored by Blaise Li's avatar Blaise Li
Browse files

Save snakefile in the analysis folder.

parent b2955080
.RData
.Rhistory
*~
*\.wrapper\.py
......@@ -82,6 +82,10 @@ config_base=$(basename ${configfile})
config_snapshot="${output_dir}/${config_base}"
echo "Saving a local copy of the configuration in ${config_snapshot}"
cp -f ${configfile} ${config_snapshot}
snakefile_base=$(basename ${snakefile})
snakefile_snapshot="${output_dir}/${snakefile_base}"
echo "Saving a local copy of the snakefile in ${snakefile_snapshot}"
cp -f ${snakefile} ${snakefile_snapshot}
kilobytes_tot=$(mawk '$1 == "MemTotal:" {print $2}' /proc/meminfo)
# Some rules were given a "mem_mb" resource section based on the "max_vms" benchmarking result.
......@@ -91,7 +95,9 @@ kilobytes_tot=$(mawk '$1 == "MemTotal:" {print $2}' /proc/meminfo)
# to avoid pretending that we have all this memory available for snakemake rules.
megabytes_resource=$(echo "${kilobytes_tot} / 1100" | bc)
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
cmd="(cd ${output_dir}; snakemake -s ${snakefile_base} --configfile ${config_base} --resources mem_mb=${megabytes_resource} $@)"
echo ${cmd} > ${log_base}.log
# https://unix.stackexchange.com/a/245610/55127
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment