.. _`bio/igv-reports`: IGV-REPORTS =========== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/igv-reports?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/igv-reports Create self-contained igv.js HTML pages. Example ------- This wrapper can be used in the following way: .. code-block:: python rule igv_report: input: fasta="minigenome.fa", vcf="variants.vcf", # any number of additional optional tracks, see igv-reports manual tracks=["alignments.bam"] output: "igv-report.html" params: extra="" # optional params, see igv-reports manual log: "logs/igv-report.log" wrapper: "v3.0.1/bio/igv-reports" Note that input, output and log file paths can be chosen freely. When running with .. code-block:: bash snakemake --use-conda the software dependencies will be automatically deployed into an isolated environment before execution. Software dependencies --------------------- * ``igv-reports=1.9.1`` Input/Output ------------ **Input:** * BAM, VCF, ... **Output:** * HTML Authors ------- * Johannes Köster Code ---- .. code-block:: python """Snakemake wrapper for igv-reports.""" __author__ = "Johannes Köster" __copyright__ = "Copyright 2019, Johannes Köster" __email__ = "johannes.koester@uni-due.de" __license__ = "MIT" from snakemake.shell import shell extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) tracks = snakemake.input.get("tracks", []) if tracks: if isinstance(tracks, str): tracks = [tracks] tracks = "--tracks {}".format(" ".join(tracks)) shell( "create_report {extra} --standalone --output {snakemake.output[0]} {snakemake.input.vcf} {snakemake.input.fasta} {tracks} {log}" ) .. |nl| raw:: html