.. _`bio/bedtools/slop`: SLOPBED ======= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/bedtools/slop?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/bedtools/slop Increase the size of each feature in a BED/BAM/VCF by a specified factor. **URL**: https://bedtools.readthedocs.io/en/latest/content/tools/slop.html Example ------- This wrapper can be used in the following way: .. code-block:: python rule bedtools_merge: input: "A.bed" output: "A.slop.bed" params: ## Genome file, tab-seperated file defining the length of every contig genome="genome.txt", ## Add optional parameters extra = "-b 10" ## in this example, we want to increase the feature by 10 bases to both sides log: "logs/slop/A.log" wrapper: "v3.0.1/bio/bedtools/slop" 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 ----- * Extra parameters requires either `-b` or (`-l` and `-r`) * This program/wrapper does not handle multi-threading. Software dependencies --------------------- * ``bedtools=2.31.1`` Input/Output ------------ **Input:** * Path to an interval file (BED/GFF/VCF) **Output:** * Path to the expanded intervals file Params ------ * ``genome``: Path to a genome file * ``extra``: additional program arguments (except for `-i` or `-g`) Authors ------- * Jan Forster Code ---- .. code-block:: python __author__ = "Jan Forster" __copyright__ = "Copyright 2019, Jan Forster" __email__ = "j.forster@dkfz.de" __license__ = "MIT" from snakemake.shell import shell ## Extract arguments extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=True, stderr=True) shell( "(bedtools slop" " {extra}" " -i {snakemake.input[0]}" " -g {snakemake.params.genome}" " > {snakemake.output})" " {log}" ) .. |nl| raw:: html