VEMBRANE TABLE

Vembrane table allows to generate table-like textfiles from vcfs based on any INFO field, CHROM, POS, REF, ALT, QUAL, and the annotation field ANN. When filtering based on ANN, annotation entries are filtered first. https://github.com/vembrane/vembrane

Example

This wrapper can be used in the following way:

rule vembrane_table:
    input:
        vcf="in.vcf",
    output:
        vcf="table/out.tsv"
    params:
        expression="CHROM, POS, ALT, REF",
        extra=""
    log:
        "logs/vembrane.log"
    wrapper:
        "0.72.0/bio/vembrane/table"

Note that input, output and log file paths can be chosen freely. When running with

snakemake --use-conda

the software dependencies will be automatically deployed into an isolated environment before execution.

Software dependencies

  • vembrane=0.5.1

Input/Output

Input:

  • A VCF-formatted file

Output:

  • A table-like textfile

Authors

  • Christopher Schröder

Code

"""Snakemake wrapper for vembrane"""

__author__ = "Christopher Schröder"
__copyright__ = "Copyright 2020, Christopher Schröder"
__email__ = "christopher.schroeder@tu-dortmund.de"
__license__ = "MIT"

from snakemake.shell import shell

log = snakemake.log_fmt_shell(stdout=False, stderr=True)

extra = snakemake.params.get("extra", "")

shell(
    "vembrane table"  # Tool and its subcommand
    " {extra}"  # Extra parameters
    " {snakemake.params.expression:q}"
    " {snakemake.input}"  # Path to input file
    " > {snakemake.output}"  # Path to output file
    " {log}"  # Logging behaviour
)