My goal is to process two samples, S1
and S2
, using two rules, step1
, step2
.
The Snakemake file is like:
samplesSAMPLES = ['S1', 'S2']
rule all:
input: "S1expand("{sample}.done", "S2.done"sample = SAMPLES)
rule step1:
input: "{sample}"
output: "{sample}.step1.donedone"
shell: "touch {output}"
rule step2:
input: "{sample}.step1.donedone"
output: "{sample}.donedone"
shell: "touch {output}"
The current execution order is:
step1 on S1
step1 on S2
step2 on S1
step2 on S2
Is there a way to change the order to:
step1 on S1
step2 on S1
step1 on S2
step2 on S2
Basically, I want to complete S1
, then S2
.
Is there a way to specify the order of executions in Snakemake?