问题
I want to include the shell command as well as the source code of external scripts of snakemake Rules in my html report (I saw that people have those in the table of the RULE seqment).
The example below is part of the Basic Example from the doc. https://snakemake.readthedocs.io/en/stable/tutorial/basics.html
rule bcftools_call:
input:
fa="data/genome.fa",
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
output:
"calls/all.vcf"
shell:
"samtools mpileup -g -f {input.fa} {input.bam} | "
"bcftools call -mv - > {output}"
rule plot_quals:
input:
"calls/all.vcf"
output:
report("plots/quals.svg", caption="report/quals.rst")
script:
"scripts/plot-quals.py"
And the Report should include something like
"samtools mpileup -g -f {input.fa} {input.bam} | "
"bcftools call -mv - > {output}"
as well as the code of "plot-quals.py"
How can I acomplish that?
来源:https://stackoverflow.com/questions/57790165/include-parameters-and-source-code-in-snakemake-html-report