I'm developing a snakemake pipeline to QC a large set of data. I'd like to generate a set of plots for each dataset and then generate a html report that combines the plots with some text. Looking at https://snakemake.readthedocs.io/en/stable/snakefiles/reporting.html, this will only generate one report for the whole pipeline. Is there a way to do this per dataset?
The functionality to do this is still available via the old way of generating reports with report()
, but this is now deprecated. Wondering if there is a recommended way to achieve something like the below with the newer report functionality.
from snakemake.utils import report
rule createreport:
input:
plot1 = "results/{dataset}/plot1.pdf",
output:
report = "reports/{dataset}.html"
run:
report("""
This plot shows etc...
plot1_
""", output.report, **input)