TABIX

Process given file with tabix (e.g., create index).

URL: https://www.htslib.org/doc/tabix.html#INDEXING_OPTIONS

Example

This wrapper can be used in the following way:

rule tabix:
    input:
        "{prefix}.vcf.gz",
    output:
        "{prefix}.vcf.gz.tbi",
    log:
        "logs/tabix/{prefix}.log",
    params:
        # pass arguments to tabix (e.g. index a vcf)
        "-p vcf",
    wrapper:
        "v1.9.0/bio/tabix/index"

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.

Notes

  • Specify tabix index params (e.g. -p vcf) through params.

Software dependencies

  • htslib=1.15

Input/Output

Input:

  • Bgzip compressed file (e.g. BED.gz, GFF.gz, or VCF.gz)

Output:

  • Tabix index file

Authors

  • Johannes Köster

Code

__author__ = "Johannes Köster"
__copyright__ = "Copyright 2016, Johannes Köster"
__email__ = "koester@jimmy.harvard.edu"
__license__ = "MIT"


from snakemake.shell import shell

log = snakemake.log_fmt_shell(stdout=False, stderr=True)

shell("tabix {snakemake.params} {snakemake.input[0]} {log}")