TABIX INDEX

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

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:
        "v3.10.2-32-gf4e5b66/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.20

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}")