Skip to main content

Tests Coverage PyPI

PyEnsembl

PyEnsembl queries Ensembl genes, transcripts, exons and sequences from local indexes. It supports numbered releases, dated new-platform annotations and custom matched GTF/FASTA files.

Installation

Use Python 3.11 or later. Install the package and one explicit annotation:

python -m pip install pyensembl
pyensembl install --release 93 --species human

This selects human GRCh38 and downloads and indexes its annotation, transcript and peptide files. Setup takes several minutes and disk space; whole-genome DNA is optional. See installation and first lookup.

Example Usage

After installing the data above:

from pyensembl import EnsemblRelease

with EnsemblRelease(93, species="human") as data:
    gene = data.gene_by_id("ENSG00000141510")
    print(gene.name, gene.contig, gene.start, gene.end, gene.strand)
TP53 17 7661779 7687550 -

Coordinates are one-based and inclusive; TP53 is on the minus strand. Pin the release you analyze: coordinates, IDs and sequences can change between releases, and a gene name can match several loci. The documentation continues with protein and transcript sequences.

Documentation

The documentation home page includes installation and getting-started examples. Use these guides for other tasks:

Task Guide
Find genes by name, position or biotype Genes and transcripts
Protein, coding and transcript sequences; exons Get protein and transcript sequences
Search additional gene names Alias lookup
Read genomic DNA Reference DNA
Choose an assembly, species and coverage Assembly selection
Install from Python, check or delete data Install and manage data
Use your own annotations Custom genomes
Use dated Ensembl downloads Dated annotations
Find a class or query method API reference

For contributions, see development setup, documentation style and releasing. Every PR includes a version bump, lint and tests; maintainers merge through a PR and publish with ./deploy.sh from clean main.

Metadata

Release files for pyensembl 2.32.3

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

Source distribution (sdist)

Source distribution for pyensembl 2.32.3
File Size Uploaded Provenance Actions
pyensembl-2.32.3.tar.gz 513.4 kB Without provenance Details for pyensembl-2.32.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyensembl 2.32.3
File Interpreter ABI Platform Actions
pyensembl-2.32.3-py3-none-any.whl Python 3 none any Details for pyensembl-2.32.3-py3-none-any.whl

Total release size: 680.4 kB

Release files / pyensembl-2.32.3.tar.gz

Download URL pyensembl-2.32.3.tar.gz
Size 513.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d663c60936bf3159a231c8f81ce790599a519615d5118ca7e09d60c5bd4d4cff
BLAKE2b-256 checksum
How to use checksums
01cf24b66d3538149a39af8e9e6e4b4e8b2b181d9b37279af70be26b29e5f8de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / pyensembl-2.32.3-py3-none-any.whl

Download URL pyensembl-2.32.3-py3-none-any.whl
Size 167.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f872120f860bd3c504378c415d67ef411beca85953d18f6a184c586b91071021
BLAKE2b-256 checksum
How to use checksums
a44387282ba75b8a5eef2ea443181951db20f47e190643cb7adc3ac277fcdbc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Security for pyensembl 2.32.3

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

2.32.3 This release

2 release files No provenance

0.3

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