TWOBITINFO

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/ucsc/twoBitInfo?label=version%20update%20pull%20requests

Generate *.chorom.sizes file by *.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:

rule twoBitInfo:
    input:
        "{sample}.2bit"
    output:
        "{sample}.chrom.sizes"
    log:
        "logs/{sample}.chrom.sizes.log"
    params:
        "" # optional params string
    wrapper:
        "v3.8.0-49-g6f33607/bio/ucsc/twoBitInfo"

Note that input, output and log file paths can be chosen freely.

When running with

snakemake --use-conda

the software dependencies will be automatically deployed into an isolated environment before execution.

Software dependencies

  • ucsc-twobitinfo=455

Input/Output

Input:

  • Path to genome *.2bit file

Output:

  • Path to output *.chrom.sizes file

Authors

  • Roman Cherniatchik

Code

"""Snakemake wrapper for *.2bit to *.fa conversion using UCSC twoBitInfo 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("twoBitInfo {extra} {snakemake.input} {snakemake.output} {log}")