.. _`bio/vembrane/filter`: VEMBRANE FILTER =============== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/vembrane/filter?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/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: .. code-block:: python rule vembrane_filter: input: vcf="in.vcf", output: vcf="filtered/out.vcf" params: expression="POS > 4000", extra="" log: "logs/vembrane.log" wrapper: "v3.0.1/bio/vembrane/filter" 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 --------------------- * ``vembrane=1.0.3`` Input/Output ------------ **Input:** * A VCF-formatted file **Output:** * A VCF-formatted file Authors ------- * Christopher Schröder Code ---- .. code-block:: python """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 ) .. |nl| raw:: html