Skip to main content

Utilities for working with NGS index formats.

Project description

# ngsindex

Support for reading various NGS-related index formats:

* [BAI](
* [TBI](
* [CSI](

# Installation

pip install ngsindex

# Usage

from ngsindex import IndexType, resolve_index_file, parse_index
from pathlib import Path

bam_file = Path('/path/to/reads.bam')

# Resolve the location of the BAM index file.
index_file = resolve_index_file(bam_file, IndexType.BAI)

# Load the index
index = parse_index(index_file)

# Loop through chromosome indexes
for refidx in index.ref_indexes:

# Limitations

* CRAM files are not yet supported (neither .crai nor .bai index files).

# Todo

* Add support for splitting BAI:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ngsindex, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size ngsindex-0.1.5.tar.gz (43.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page