.. _`bio/bedtools/complement`: COMPLEMENTBED ============= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/bedtools/complement?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/bedtools/complement Maps all regions of the genome which are not covered by the input. **URL**: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html Example ------- This wrapper can be used in the following way: .. code-block:: python rule bedtools_complement_bed: input: in_file="a.bed", genome="dummy.genome" output: "results/bed-complement/a.complement.bed" params: ## Add optional parameters extra="-L" log: "logs/a.complement.bed.log" wrapper: "v4.6.0-24-g250dd3e/bio/bedtools/complement" rule bedtools_complement_vcf: input: in_file="a.vcf", genome="dummy.genome" output: "results/vcf-complement/a.complement.vcf" params: ## Add optional parameters extra="-L" log: "logs/a.complement.vcf.log" wrapper: "v4.6.0-24-g250dd3e/bio/bedtools/complement" 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. Notes ----- * This program/wrapper does not handle multi-threading. Software dependencies --------------------- * ``bedtools=2.31.1`` Input/Output ------------ **Input:** * ``in_file``: interval files (BED/GFF/VCF) * ``genome``: genome file **Output:** * complemented BED/GFF/VCF file Params ------ * ``extra``: additional program arguments (except `-i` and `-g`) Authors ------- * Antonie Vietor Code ---- .. code-block:: python __author__ = "Antonie Vietor" __copyright__ = "Copyright 2020, Antonie Vietor" __email__ = "antonie.v@gmx.de" __license__ = "MIT" from snakemake.shell import shell extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) shell( "(bedtools complement" " {extra}" " -i {snakemake.input.in_file}" " -g {snakemake.input.genome}" " > {snakemake.output[0]})" " {log}" ) .. |nl| raw:: html