有没有办法在没有触摸文件的情况下链接snakemake规则?

时间:2017-08-10 23:44:46

标签: chaining snakemake

有没有办法完成以下helpAll规则而不创建不需要的空文件helpA,helpB,helpC,然后删除它们?

rule helpA:
    output: touch("helpA")
    shell: "echo 'help on subject <A>'"

rule helpB:
    output: touch("helpB")
    shell: "echo 'help on subject <B>'"

rule helpC:
    output: touch("helpC")
    shell: "echo 'help on subject <C>'"

rule helpAll:
    input: "helpA","helpB","helpC"
    shell: "rm {input}

一个不错的解决方案是以下排序的规则依赖关系,但这不是有效的snakecode:

rule helpAll:
    input: rules.helpA,rules.helpB,rules.helpC

或:

rule helpAll:
    depends_on_rule: helpA,helpB,helpC

0 个答案:

没有答案