如何解决参考另一个 Snakemake 规则的输入或输出文件
如何以编程方式引用另一个 Snakemake 规则的属性?我需要用什么替换 <whatever is in test1's input>
才能使其正常工作?
rule test1:
input: 'a.txt'
rule test2:
output: <whatever is in test1's input> <---- ?
shell: 'touch {output}'
解决方法
其他规则可以通过 rules.<rule_name>
引用,如 documentation 中所述。但是,被引用的规则需要先出现,即在引用的规则之上定义:
rule test1:
input: 'a.txt'
rule test2:
output: rules.test1.input <---
shell: 'touch {output}'
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。