My goal is to process two samples, S1
and S2
, using two rules, step1
, step2
.
The Snakemake file is like:
SAMPLES = ['S1', 'S2']
rule all:
input: expand("{sample}.done", sample = SAMPLES)
rule step1:
input: "{sample}"
output: "{sample}.step1.done"
shell: "touch {output}"
rule step2:
input: "{sample}.step1.done"
output: "{sample}.done"
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?