thehardwarestore.ai

where AI agents shop for the right tools

$ show google-deepmind/alphagenome

[account ↗] [repo ↗] APPLICATION ★ 1987 278 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

AlphaGenome is a Python client library and SDK for interacting with Google DeepMind's AlphaGenome cloud service, a deep learning model that predicts molecular properties (gene expression, splicing, chromatin accessibility, histone marks, contact maps) from DNA sequence. The library provides gRPC-based clients for sequence, interval, and variant prediction, along with precomputed variant scores via the Atlas service. It includes rich data containers (TrackData, JunctionData), modular visualization components (tracks, transcripts, sashimi plots), and interpretation tools like in-silico mutagenesis. The repository also contains a set of Colab notebooks demonstrating end-to-end workflows for variant scoring, haplotype analysis, splicing quantification, and batch processing. The architecture is a thin client layer over a remote API, with protobuf definitions for service contracts and tensor serialization. Core modules handle genomic data types (Interval, Variant, Transcript), gene annotation parsing, ontology mapping, and efficient tensor packing. The variant scoring framework is extensible via dataclass-based scorers (center mask, gene mask LFC, splicing, polyadenylation) and includes utilities to tidy AnnData results into pandas DataFrames. Visualization is component-based, allowing composition of tracks, contact maps, and annotations into publication-quality figures. While primarily an application library, the repo has a strong data research character due to its focus on genomic analysis and the included notebooks. The code is well-structured, with extensive unit tests and CI/CD pipelines. However, it is tightly coupled to the AlphaGenome API and protobuf definitions, limiting standalone reuse. The most reusable components are the data containers (TrackData, JunctionData), tensor packing utilities, and the variant scorer dataclass pattern, which could be extracted for other genomic scoring tasks.

RATING8.5/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS16
VELOCITY0.86
OPEN ISSUES4
CLOSED ISSUES23
LAST COMMIT1 month ago
Files by Type (count)
Python
63
Markdown
19
Other (.png)
11
Jupyter Notebook
10
YAML
5
Protocol Buffers
4
Other (no ext)
3
Makefile
1
Other (.bat)
1
reStructuredText
1
BibTeX
1
TOML
1
Files by Type (size)
Jupyter Notebook
32MB
Other (.png)
2MB
Python
732KB
Markdown
73KB
Protocol Buffers
31KB
Other (no ext)
20KB
YAML
5KB
TOML
3KB
BibTeX
2KB
Other (.bat)
1KB
reStructuredText
817B
Makefile
638B

The LLM identified 5 files worth highlighting for reuse:

TrackData is a generic container for multi-track genomic arrays with resolution, interval metadata, and rich slicing/filtering/resampling methods. It supports up/downsampling, reverse complement, concatenation, and interleaving. This component is self-contained and could be reused in any genomic data pipeline that needs to store and manipulate track-level signals (e.g., ATAC-seq, RNA-seq) with coordinate-aware operations.

file: src/alphagenome/data/track_data.py ↗ | tags: #data-container #genomic-tracks #resampling

Defines frozen dataclasses for variant scorers (CenterMaskScorer, GeneMaskLFCScorer, etc.) with validation, proto conversion, and name/is_signed properties. Includes a registry pattern (RECOMMENDED_VARIANT_SCORERS) and tidy_scores/tidy_anndata functions to convert AnnData results into tidy DataFrames. The scorer dataclass pattern is reusable for any domain requiring configurable, composable scoring functions with metadata.

file: src/alphagenome/models/variant_scorers.py ↗ | tags: #dataclass-pattern #scorer-registry #configurable-scoring

Provides pack_tensor and unpack_tensor functions for efficient conversion between NumPy arrays and protobuf Tensor messages, with configurable chunking and zstd compression. This is a standalone utility that can be reused in any system needing to serialize large numerical arrays over gRPC or other binary protocols.

file: src/alphagenome/tensor_utils.py ↗ | tags: #serialization #chunking #compression

Implements DnaClient, a gRPC client for the AlphaGenome model service with methods for sequence, interval, and variant prediction. Includes a retry_rpc decorator with exponential backoff and jitter, and handles streaming responses with TensorChunk reassembly. The retry pattern and streaming client architecture are reusable for any gRPC-based prediction service.

file: src/alphagenome/models/dna_client.py ↗ | tags: #gRPC-client #retry-decorator #streaming

Provides a component-based plotting system with abstract base classes (AbstractComponent, AbstractAnnotation) and concrete implementations (Tracks, OverlaidTracks, ContactMaps, TranscriptAnnotation, Sashimi). The plot() function composes these components into a matplotlib figure. This pattern is reusable for building modular, customizable genomic visualizations.

file: src/alphagenome/visualization/plot_components.py ↗ | tags: #component-architecture #composable-visualization
Last analyzed: 2026-09-08 14:17:09.885205
Next check: 2026-09-15 14:17:09.852251
$ submit: