Manavalan Gajapathy
Manavalan Gajapathy

Reputation: 4089

What are the conditions for snakemake to execute a job?

I would like to know all necessary criteria required for snakemake to decide that a job needs to be executed, but I couldn't find them in their documentation. The best source I have found is in snakemake author's slides from 2016, which says:

A job is executed if and only if

- output file is target and does not exist
- output file needed by another executed job and does not exist
- input file newer than output file
- input file will be updated by other job
- execution is enforced

However it appears he has stopped using that slide since then, which makes me wonder if above criteria have changed now.

Upvotes: 3

Views: 97

Answers (1)

Dmitry Kuzminov
Dmitry Kuzminov

Reputation: 6584

This page of their documentation has a link to the slides from 2019: https://snakemake.readthedocs.io/en/stable/tutorial/tutorial.html. On the page 26 of the slides you may see the same set of rules: https://slides.com/johanneskoester/snakemake-tutorial#/25:

Job execution
A job is executed if and only if

- output file is target and does not exist
- output file needed by another executed job and does not exist
- input file newer than output file
- input file will be updated by other job
- execution is enforced

determined via breadth-first-search on DAG of jobs

I guess that nothing has changed in these rules since 2019, especially taking in the consideration that this presentation is referenced from the official tutorial page.

Upvotes: 3

Related Questions