.. _`bio/pyroe/idtoname`: PYROE ID-TO-NAME ================ .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/pyroe/idtoname?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/pyroe/idtoname Create a 2-column tab-separated file mapping IDs to names **URL**: https://pyroe.readthedocs.io/en/latest/geneid_to_name.html Example ------- This wrapper can be used in the following way: .. code-block:: python rule test_pyroe_idtoname: input: "annotation.{format}", output: "id2name.{format}.tsv", threads: 1 log: "logs/{format}.log", params: extra="", wrapper: "v3.0.1/bio/pyroe/idtoname" 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 ----- Format is automatically inferred from input files. Software dependencies --------------------- * ``pyroe=0.9.3`` Input/Output ------------ **Input:** * Path to genome annotation (GTF or GFF3) **Output:** * Path to gene id <-> gene names mapping Params ------ * ``extra``: Optional parameters to be passed to pyroe Authors ------- Code ---- .. code-block:: python __author__ = "Thibault Dayris" __copyright__ = "Copyright 2023, Thibault Dayris" __email__ = "thibault.dayris@gustaveroussy.fr" __license__ = "MIT" from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=True, stderr=True, append=True) extra = snakemake.params.get("extra", "") if str(snakemake.input).endswith(("gtf", "gtf.gz")): extra += " --format GTF " elif str(snakemake.input).endswith(("gff", "gff.gz", "gff3", "gff3.gz")): extra += " --format GFF3 " shell("pyroe id-to-name {extra} {snakemake.input} {snakemake.output} {log}") .. |nl| raw:: html