simonlabcode / bam2bakR

2 stars 0 forks source link

How to re-run snakemake without repeating jobs? #7

Closed HannahDixon closed 1 year ago

HannahDixon commented 1 year ago

Hi Isaac,

I was very near to completion with 76% of all jobs done but snakemake crashed due to an R dependency not being present (optparse). Is there a way I can re-run snakemake without having to re-run all the jobs?

Thank you in advance and thank you for your amazing work, Hannah

isaacvock commented 1 year ago

Hi Hannah,

If you run Snakemake with snakemake <whatever other parameters you usually set> --rerun-triggers mtime (e.g., snakemake --cores all --use-conda --rerun-triggers mtime, only those jobs which are missing their expected output will rerun, meaning that Snakemake will pick up where it left off.

Snakemake is designed to always only run jobs that are missing their output by default, but the reason you have to include --rerun-triggers mtime to get this behavior to work in bam2bakR is discussed in #3 and is part of a larger Snakemake quirk discussed here.

Thank you for your very kind words, they are greatly appreciated! Let me know if you have any other questions,

Isaac

HannahDixon commented 1 year ago

Perfect! thank you so much!