引用另一个Snakemake规则的输入或输出文件

Refer to input or output files of another Snakemake rule

如何以编程方式引用另一个 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}'