VEMBRANE FILTER

Vembrane filter allows to simultaneously filter variants 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. If no annotation entry remains, the entire variant is deleted. https://github.com/vembrane/vembrane

Example

This wrapper can be used in the following way:

rule vembrane_filter:
    input:
        vcf="in.vcf",
    output:
        vcf="filtered/out.vcf"
    params:
        expression="POS > 4000",
        extra=""
    log:
        "logs/vembrane.log"
    wrapper:
        "0.72.0/bio/vembrane/filter"

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 VCF-formatted file

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 filter"  # 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
)