google-deepmind/alphagenome
Python
Captured source
source ↗google-deepmind/alphagenome
Description: This API provides programmatic access to the AlphaGenome model developed by Google DeepMind.
Language: Python
License: Apache-2.0
Stars: 1941
Forks: 261
Open issues: 2
Created: 2024-10-16T09:33:11Z
Pushed: 2026-05-06T08:15:29Z
Default branch: main
Fork: no
Archived: no
README: 
AlphaGenome API
**Get API key** | [Quick start](#quick-start) | [Installation](#installation) | **Documentation** | **Community** | **Terms of Use** | **Model code**
The AlphaGenome API provides access to AlphaGenome, Google DeepMind’s unifying model for deciphering the regulatory code within DNA sequences. This repository contains client-side code, examples and documentation to help you use the AlphaGenome API.
AlphaGenome offers multimodal predictions, encompassing diverse functional outputs such as gene expression, splicing patterns, chromatin features, and contact maps (see [diagram below](#model_overview)). The model analyzes DNA sequences of up to 1 million base pairs in length and can deliver predictions at single base-pair resolution for most outputs. AlphaGenome achieves state-of-the-art performance across a range of genomic prediction benchmarks, including numerous diverse variant effect prediction tasks (detailed in Avsec et al.).
The API is offered free of charge for non-commercial use (subject to the terms of use). Query rates vary based on demand – it is well suited for smaller to medium-scale analyses such as analysing a limited number of genomic regions or variants requiring 1000s of predictions, but is likely not suitable for large scale analyses requiring more than 1 million predictions. Once you obtain your API key, you can easily get started by following our [Quick Start Guide](#quick-start), or watching our AlphaGenome 101 tutorial.

The documentation also covers a set of comprehensive tutorials, variant scoring strategies to efficiently score variant effects, and a visualization library to generate matplotlib figures for the different output modalities.
We cover additional details of the capabilities and limitations in our documentation. For support and feedback:
- Please submit bugs and any code-related issues on
- For general feedback, questions about usage, and/or feature requests, please
use the community forum – it’s actively monitored by our team so you're likely to find answers and insights faster.
- If you can't find what you're looking for, please get in touch with the
AlphaGenome team on alphagenome@google.com and we will be happy to assist you with questions. We’re working hard to answer all inquiries but there may be a short delay in our response due to the high volume we are receiving.
A commercial offering of AlphaGenome is in early stage testing, you can express interest to access the product here.
Quick start
The quickest way to get started is to run our example notebooks in Google Colab. Here are some starter notebooks:
An introduction to quickly get you started with using the model and making predictions.
Learn how to visualize different model predictions using the visualization libraries.
Alternatively, you can dive straight in by following the [installation guide](#installation) and start writing code! Here's an example of making a variant prediction:
from alphagenome.data import genome
from alphagenome.models import dna_client
from alphagenome.visualization import plot_components
import matplotlib.pyplot as plt
API_KEY = 'MyAPIKey'
model = dna_client.create(API_KEY)
interval = genome.Interval(chromosome='chr22', start=35677410, end=36725986)
variant = genome.Variant(
chromosome='chr22',
position=36201698,
reference_bases='A',
alternate_bases='C',
)
outputs = model.predict_variant(
interval=interval,
variant=variant,
ontology_terms=['UBERON:0001157'],
requested_outputs=[dna_client.OutputType.RNA_SEQ],
)
plot_components.plot(
[
plot_components.OverlaidTracks(
tdata={
'REF': outputs.reference.rna_seq,
'ALT': outputs.alternate.rna_seq,
},
colors={'REF': 'dimgrey', 'ALT': 'red'},
),
],
interval=outputs.reference.rna_seq.interval.resize(2**15),
# Annotate the location of the variant as a vertical line.
annotations=[plot_components.VariantAnnotation([variant], alpha=0.8)],
)
plt.show()Installation
> [!TIP] > You may optionally wish to create a > Python Virtual Environment to > prevent conflicts with your system's Python environment.
To install alphagenome, clone a local copy of the repository and run pip install:
$ git clone https://github.com/google-deepmind/alphagenome.git $ pip install ./alphagenome
See the documentation for information on alternative installation strategies.
Contributing
We welcome bug fixes and some new features to this project. Before sending your pull request, please read the [CONTRIBUTING](CONTRIBUTING.md) documentation, ensure all tests pass, and that your contributions are formatted correctly.
You can check your changes by running the following from the alphagenome root directory:
$ python3 -m pip install hatch $ python3 -m hatch run check:all # Runs linter and formatter. $ python3 -m hatch test
Citing alphagenome
If you use AlphaGenome in your research, please cite…
Excerpt shown — open the source for the full document.
Notability
notability 8.0/10Notable DeepMind research repo with strong traction.