VEMBRANE¶
Vembrane 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
Software dependencies¶
- vembrane =0.4.1
Example¶
This wrapper can be used in the following way:
rule vembrane:
input:
vcf="in.vcf",
output:
vcf="filtered/out.vcf"
params:
expression="POS > 4000",
extra=""
log:
"logs/vembrane.log"
wrapper:
"0.65.0/bio/vembrane"
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.
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" # Tool and its subcommand
" {extra}" # Extra parameters
' "{snakemake.params.expression}"'
" {snakemake.input.vcf}" # Path to input vcf file
" > {snakemake.output.vcf}" # Path to output vcf file
" {log}" # Logging behaviour
)