I was wondering if it makes sense to add an extra output file for each rule as a checkpoint, something in the lines of
output:
out=os.path.join(config["out_dir"], "{sample}", "execute.out"),
finisher=os.path.join(config["out_dir"], "{sample}", "execute.done")
shell:
"(EXECUTE_COMMAND \
-i {input.bam} \
-o {output.out} \
-p1 {params.param1} \
-p2 {params.param2}) \
&> {log};
echo "DONE" >{output.finisher}"
This acts as a checkpoint for each rule, in cases where the program(s) partially executes or sometimes the node exits abruptly.
Thank you.