首页 > 解决方案 > 如何强制通配符进入 --report 标题

问题描述

我正在使用snakemake --report(v5.9.1) 为管道/结果创建 .html 报告。但是我不能在caption参数中使用通配符report()

这是一个没有使用通配符的简短示例caption

rule all:
     input: expand("doit.{role}", role=["founder","offspring"])
rule doit:
      output: report(touch("doit.{role}"),caption="doit.rst")
      run: print(output[0])

现在,我想要/需要的是founderand的单独标题offspring。我试图简单地将{role}通配符添加到caption

      output: report(touch("doit.{role}"),caption="doit.{role}.rst")

但这给出了一个错误

FileNotFoundError: [Errno 2] No such file or directory: 'sandBox/doit.{role}.rst'

在通过运行生成 hmtl 文件时snakemake --report。(运行管道就可以了)。

解析时似乎output没有评估/替换通配符。caption

我正在使用标题功能来显示简短的结果,并在 .html 报告中对结果进行排序。(与Snakemake 报告相关:如何按管道顺序显示结果)。

任何人都可以为我正在尝试做的事情提出解决方法或更好的模式吗?

标签: reportsnakemake

解决方案


推荐阅读