Skip to main content

genebeddings

Unified interface for extracting embeddings from genomic foundation models.

Overview

genebeddings provides:

  • Standardized wrappers for 16 genomic foundation models (transformers, CNNs, state-space models, track predictors)
  • Geometric analysis tools for single-variant and epistasis embeddings
  • Embedding storage via SQLite key-value store
  • Benchmarking utilities for pathogenicity prediction

Installation

pip install -e .

Install with model-specific dependencies:

pip install -e ".[nt]"          # Nucleotide Transformer
pip install -e ".[borzoi]"      # Borzoi
pip install -e ".[alphagenome]" # AlphaGenome (requires JAX + GPU)
pip install -e ".[all]"         # Common models

Quick Start

Embeddings

from genebeddings.wrappers import NTWrapper

model = NTWrapper()
embedding = model.embed("ACGTACGT" * 100, pool="mean")  # (hidden_dim,) numpy array

Nucleotide Predictions

probs = model.predict_nucleotides("ACGTNACGT", positions=[4])
# [{'A': 0.1, 'C': 0.2, 'G': 0.3, 'T': 0.4}]

Track Predictions

from genebeddings.wrappers import BorzoiWrapper

borzoi = BorzoiWrapper()
tracks = borzoi.predict_tracks("ACGT" * 131_072)  # (num_tracks, length) numpy array

Variant Geometry

from genebeddings import SingleVariantGeometry

geom = SingleVariantGeometry(wt_embedding, mut_embedding)
print(geom.cosine_distance, geom.euclidean_distance)

Supported Models

Wrapper Architecture Max Input Capabilities
AlphaGenomeWrapper Encoder-Transformer-Decoder (JAX) 1M bp embed, tracks, variants
BorzoiWrapper CNN (PyTorch) 524K bp embed, tracks
CaduceusWrapper Bidirectional SSM ~131K tokens embed, nucleotides
DNABERTWrapper Transformer (BPE) Model-dep. embed, nucleotides
Evo2Wrapper SSM Very long embed, nucleotides, generate
GPNMSAWrapper Transformer + MSA Model-dep. embed (MSA), nucleotides
HyenaDNAWrapper Hyena SSM Up to 1M bp embed
NTWrapper Transformer (k-mer) Long embed, nucleotides
RiNALMoWrapper Transformer (RNA) Model-dep. embed, nucleotides
SpliceAIWrapper CNN Model-dep. embed, splice sites
SpliceBertWrapper Transformer Model-dep. embed, nucleotides

See wrappers/summary.md for full details.

Testing

python quick_test.py

Metadata

Release files for genebeddings 0.1.0

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

Source distribution (sdist)

Source distribution for genebeddings 0.1.0
File Size Uploaded Provenance Actions
genebeddings-0.1.0.tar.gz 139.7 kB Without provenance Details for genebeddings-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 308.8 kB

Release files / genebeddings-0.1.0.tar.gz

Download URL genebeddings-0.1.0.tar.gz
Size 139.7 kB
Tags Source
SHA-256 checksum
How to use checksums
82ac8db9164161878d9318b7e1566dc0599df56d5641b58f36a30288dc6530e6
BLAKE2b-256 checksum
How to use checksums
e23bf1f89e2f631a71b7c82d3d5cb3241c4a49cc64f6d155eb35e13ddb382d01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Release files / genebeddings-0.1.0-py3-none-any.whl

Download URL genebeddings-0.1.0-py3-none-any.whl
Size 169.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00c404718640887aa999949a781651ef3a92b2f80a96b392e5137db1bd593803
BLAKE2b-256 checksum
How to use checksums
1785add2fc28044d61b2a0b4a0bc7df93fe8fb3927ae8c20b088b94beb92a100
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Security for genebeddings 0.1.0

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

0.1.0 This release

2 release files 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