Include Parameters and source code in Snakemake HTML Report

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-15 11:12:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!