.. _`bio/cnvkit/target`: CNVKIT TARGET ============= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/cnvkit/target?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/cnvkit/target Prepare a BED file of baited regions for use with CNVkit. **URL**: https://cnvkit.readthedocs.io/en/stable/pipeline.html#target Example ------- This wrapper can be used in the following way: .. code-block:: python rule cnvkit_targetl: input: bed="test.bed", annotate="refflat-mini.txt", output: bed="test.target.bed", log: "logs/test.target.log", params: extra = "--split" # optional wrapper: "v3.0.1/bio/cnvkit/target" 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 --------------------- * ``cnvkit=0.9.10`` Input/Output ------------ **Input:** * ``bed``: bed file * ``annotate``: gene annotation databases, e.g. RefSeq or Ensembl, as a “flat” format (can be found at UCSC) (optional) **Output:** * ``bed``: bed file Params ------ * ``extra``: additional parameters that will be forwarded to cnvkit target Authors ------- * Patrik Smeds Code ---- .. code-block:: python __author__ = "Patrik Smeds" __copyright__ = "Copyright 2023, Patrik Smeds" __email__ = "patrik.smeds@gmail.com" __license__ = "MIT" from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=False, stderr=True) extra = snakemake.params.get("extra", "") annotate = snakemake.input.get("annotate", "") if annotate: annotate = f"--annotate {annotate}" shell( "cnvkit.py target " "{snakemake.input.bed} " "-o {snakemake.output.bed} " "{annotate} " "{extra} " "{log}" ) .. |nl| raw:: html