Skip to main content

Intervaltree-Bio

Convenience classes for loading UCSC genomic annotation records into a set of interval tree data structures.

Installation

The easiest way to install most Python packages is via easy_install or pip:

$ pip install intervaltree-bio

The package requires the intervaltree package (which is normally installed automatically when using pip or easy_install).

Usage

One of the major uses for Interval tree data structures is in bioinformatics, where the intervals correspond to genes or other features of the genome.

As genomes typically consist of a set of chromosomes, a separate interval tree for each chromosome has to be maintained. Thus, rather than using an single interval tree, you would typically use something like defaultdict(IntervalTree) to index data of genomic features. The module intervaltree_bio offers a GenomeIntervalTree data structure, which is a similar convenience data structure. In addition to specific methods for working with genomic intervals it also provides facilities for reading BED files and the refGene table from UCSC.

The core example is loading the transcription regions of the knownGene table from the UCSC website:

>> from intervaltree_bio import GenomeIntervalTree
>> knownGene = GenomeIntervalTree.from_table()
>> len(knownGene)

It is then possible to use the data structure to search known genes within given intervals:

>> result = knownGene[b'chr1'].search(100000, 138529)

It is possible to load other UCSC tables besides knownGene or specify custom URL or file to read the table from. Consult the docstring of the GenomeIntervalTree.from_table method for more details.

Metadata

Release files for intervaltree_bio 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for intervaltree_bio 1.0.1
File Size Uploaded Provenance Actions
intervaltree_bio-1.0.1.zip 12.2 kB Without provenance Details for intervaltree_bio-1.0.1.zip

Release files / intervaltree_bio-1.0.1.zip

Download URL intervaltree_bio-1.0.1.zip
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4f8ee8d5951c06072fdf03463bcd315920ef20b97947e85281330def79cdb2cd
BLAKE2b-256 checksum
How to use checksums
dee6c542057e7054cdb4139162041588d3b20f49dace223e7303a99a240bf6fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for intervaltree_bio 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page