.. _`bio/ucsc/faToTwoBit`: FATOTWOBIT ========== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/ucsc/faToTwoBit?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/ucsc/faToTwoBit Convert \*.fa file to \*.2bit file (see http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/FOOTER.txt) Example ------- This wrapper can be used in the following way: .. code-block:: python # Example: from *.fa file rule faToTwoBit_fa: input: "{sample}.fa" output: "{sample}.2bit" log: "logs/{sample}.fa_to_2bit.log" params: "" # optional params string wrapper: "v3.0.4/bio/ucsc/faToTwoBit" # Example: from *.fa.gz file rule faToTwoBit_fa_gz: input: "{sample}.fa.gz" output: "{sample}.2bit" log: "logs/{sample}.fa-gz_to_2bit.log" params: "" # optional params string wrapper: "v3.0.4/bio/ucsc/faToTwoBit" 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 --------------------- * ``ucsc-fatotwobit=455`` Input/Output ------------ **Input:** * Path(s) to genome \*.fa or \*.fa.gz files **Output:** * Path to output '\*.2bit' file Authors ------- * Roman Cherniatchik Code ---- .. code-block:: python """Snakemake wrapper for *.2bit to *.fa conversion using UCSC faToTwoBit tool.""" # http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/FOOTER.txt __author__ = "Roman Chernyatchik" __copyright__ = "Copyright (c) 2019 JetBrains" __email__ = "roman.chernyatchik@jetbrains.com" __license__ = "MIT" from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=True, stderr=True) extra = snakemake.params.get("extra", "") shell("faToTwoBit {extra} {snakemake.input} {snakemake.output} {log}") .. |nl| raw:: html