diff --git a/.gitignore b/.gitignore
index 391eea7c53ef674b8200f4ac68c098989273b843..939b39609b64370dd3a8ef7a8ad78cd5b7007483 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
+.RData
+.Rhistory
 *~
 *\.wrapper\.py
diff --git a/run_pipeline.sh b/run_pipeline.sh
index ff7681f308c71c1db3eb4d7f67fd65f5136d1a5d..38637d4768d05be93dba07f0f2b009c864841c55 100755
--- a/run_pipeline.sh
+++ b/run_pipeline.sh
@@ -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