Let’s say I have a snakemake rule something like this
rule xxx:
output:
temp(directory("atac_seq/"))
shell:
"""
snakemake --cores all
"""
and in my config file, I have an config[“delete”] = #True or False
Can I make temp delete atac_seq based on whether delete is true or false?
e.g.
rule xxx:
output:
if config["delete"] = True:
temp(directory("atac_seq/"))
elif config["delete"] = False:
directory("atac_seq/")
shell:
"""
snakemake --cores all
"""
I can’t think of a way to do this other than adding rm in shell.