alphagenome-single-variant-analysis
Analyzes how genetic variants affect gene expression, chromatin accessibility, and splicing using the AlphaGenome API.
Identity proven by GitHub's verified organisation badge (flutter, google)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- Apache-2.0 (permissive)
- Pin
- 6883275pinned Oct 9, 2026
- Context cost
- about 2,800 tokenswhen the skill loads
- GitHub stars
- 3,224on google-deepmind/science-skills
- Scripts
- 7 scripts
What it does
“Analyzes genetic variant effects on gene expression (RNA-seq), chromatin accessibility (DNASE), histone marks (ChIP), and transcription factors using the AlphaGenome API. Use when the user asks about non-coding variant effects, pathogenicity, clinical significance, disease associations, functional effects, gene expression changes, splicing disruption, or regulatory effects in promoters and enhancers. Also use for resolving biological terms to tissue/cell-type ontologies (UBERON/CL) or analyzing variants in chr:pos:ref>alt format.”
Generated summary from the skill's own text
Analyzes how genetic variants affect gene expression, chromatin accessibility, and splicing using the AlphaGenome API. The skill predicts variant pathogenicity and functional effects across tissues and cell types, then visualizes results with plots and generates interpretive reports.
When to use it
- Predicting effects of non-coding variants on gene regulation
- Assessing variant pathogenicity across multiple tissues
- Analyzing splicing disruption and expression changes from variants
- Investigating disease-associated variant mechanisms
When not to
- No AlphaGenome API key available or license not accepted
- Analyzing coding variants for protein sequence changes
- When only external gene databases are accessible offline
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add google-deepmind/science-skills --skill alphagenome-single-variant-analysisInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install google-deepmind/science-skills alphagenome-single-variant-analysis@68832757cbbf941c620b71df5756cf6e5cc287b0Installs the commit we checked (6883275).
Copy by hand
Download the folder at 6883275 and put it in .claude/skills/alphagenome-single-variant-analysis for Claude Code and in .agents/skills/alphagenome-single-variant-analysis for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install chrome-devtools-mcp@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install alloydb-omni@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install bigquery-data-analytics@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "alphagenome-single-variant-analysis" by Google. Source, pinned to commit 68832757cbbf941c620b71df5756cf6e5cc287b0: https://github.com/google-deepmind/science-skills/tree/68832757cbbf941c620b71df5756cf6e5cc287b0/skills/alphagenome_single_variant_analysis 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/alphagenome-single-variant-analysis/ for Claude Code and .agents/skills/alphagenome-single-variant-analysis/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/google/alphagenome-single-variant-analysis
SKILL.md at the pin
---
name: alphagenome-single-variant-analysis
description: >
Analyzes genetic variant effects on gene expression (RNA-seq), chromatin
accessibility (DNASE), histone marks (ChIP), and transcription factors
using the AlphaGenome API. Use when the user asks about non-coding variant effects,
pathogenicity, clinical significance, disease associations, functional
effects, gene expression changes, splicing disruption, or regulatory effects
in promoters and enhancers. Also use for resolving biological terms to
tissue/cell-type ontologies (UBERON/CL) or analyzing variants in
chr:pos:ref>alt format.
---
# Variant Analysis using AlphaGenome
## Prerequisites
1. **`uv`**: Read the `uv` skill and follow its Setup instructions to ensure
`uv` is installed and on PATH.
2. **User Notification**: If
.licenses/alphagenome_single_variant_analysis_LICENSE.txt does not already
exist in the workspace root directory then (1) prominently notify the user
to check the terms at https://deepmind.google.com/science/alphagenome/, then
(2) create the file recording the notification text and timestamp.
3. **`.env` file**: Make sure the `.env` file exists in your home directory.
Create one if it does not exist.
4. **`ALPHAGENOME_API_KEY`**: This skill requires an API key to function.
You can register for a key at https://deepmind.google.com/science/alphagenome/.
You **MUST** use the safe credentials protocol in the `credentials` skill to
check for and request this key if this skill looks relevant to the user's request.
5. **`ALPHAGENOME_GTF_PATH` (Optional)**: Accelerate gene/transcript lookup by
pointing to a local copy of the GTF feather file instead of downloading from
GCS:
```bash
echo "ALPHAGENOME_GTF_PATH=/path/to/local/gencode.v46.annotation.gtf.gz.feather" >> ~/.env
```
## Core Rules
- **NEVER run `python3` or `python3 -c` directly.** The system Python does not
necessarily have pandas, numpy, and other key dependencies. ALWAYS use `uv
run` to run ALL Python code — including scripts, ad-hoc analysis files, and
one-liners. Do not attempt to `pip install` or create new venvs — `uv`
manages an isolated environment automatically.
- **Offline Only**: NEVER use external APIs (e.g., MyGene.info, Ensembl REST)
for gene/transcript lookup. Use `lookup_gene_info.py` with the local GTF. If
it fails, fix the environment/paths, do not switch to external APIs.
- **API Key is required**: `ALPHAGENOME_API_KEY` must be set before running
any script.
- **Notification**: If this skill is used, ensure this is mentioned in the
output.
- **Report Format**: Always use the templates in `docs/report-templates.md`
for generating analysis reports, and ensure to include the table of top hits
from the discovery scan.
## Environment Setup & Troubleshooting
### Python Environment
All scripts must be executed using `uv run`, which manages an isolated virtual
environment with the correct dependencies via `uv`.
```bash
uv run <script_name> [args...]
```
For ad-hoc scripts (e.g., inline analysis code saved to a temp file), pass the
full path instead of a short name:
```bash
uv run --project $SKILL_DIR /tmp/my_analysis.py --arg1 val1
```
> [!NOTE] The first invocation resolves and installs dependencies (~10s).
> Subsequent runs use the cached environment and start instantly. The cache
> lives in `~/.cache/uv/`.
### Common Issues
- **Column Names**: `tidy_scores` and metadata often use `gene_name` (not
`gene_symbol`) and `output_type` (not `modality`). Always inspect
`df.columns` before filtering.
- **Large Genes**: Genes > 500kb (e.g., `USH2A`) break the `whole_gene` view.
Use `--view detail` or manual regional windows instead.
- **Sashimi Strand Error**: `plot_components.Sashimi` does NOT accept a
`strand` argument directly. Filter input tracks instead.
- **KeyError: 'ontology_curie'**: Not all tracks have `ontology_curie`. Check
`track.metadata.columns` before filtering.
- **Python Path**: If `exec: "python": executable file not found` occurs,
ensure you are using `uv run` instead of bare `python`/`python3`.
- **NotImplementedError (pandas)**: "iLocation based boolean indexing on an
integer type is not available". This occurs when using boolean masks with
`.iloc` on integer-indexed DataFrames in newer pandas versions. **Fix**:
Convert boolean masks to integer indices using `np.flatnonzero(mask)`.
- **GTF Feather Case Sensitivity**: The AlphaGenome GTF Feather file uses
**Capitalized** column names (`Feature`, `Start`, `End`, `Strand`) unlike
standard GTF files. Always check `df.columns` if getting KeyErrors.
- **`score_variant` ontology filtering**: `score_variant` does NOT accept
`ontology_terms` as an argument. You must filter the returned AnnData
objects manually by inspecting `adata.var` columns. In contrast,
`predict_variant` DOES accept `ontology_terms` directly.
- **Sashimi Zoom Logic**: To ensure "skipping" arcs are visible, expand the
zoom to include the **flanking exons** rather than relying on junction
overlap alone.
- **Junction Scores**: Raw `Junction` objects from `prediction` may be simple
Intervals. Use `junction_data.get_junctions_to_plot(predictions=...,
name=...)` to retrieve objects with the `.k` (abundance/score) attribute.
- **`uv` Not Found**: If `exec: uv: not found`, follow the installation
instructions in [Prerequisites](#prerequisites).
- **Registry Authentication Error (401)**: If `uv` fails with 401 Unauthorized
for a private registry, set `UV_INDEX_URL=https://pypi.org/simple` before
running the script.
## References
- [alphagenome-api.md](docs/alphagenome-api.md) — API reference and code
patterns
- [interpretation-guide.md](docs/interpretation-guide.md) — Interpretation
guide, score magnitude rules, ISM, and checklist.
- [report-templates.md](docs/report-templates.md) — Full report templates
- [`scripts/visualize_variant_effects.py`](scripts/visualize_variant_effects.py)
— Single-variant visualization template (Ref/Alt comparisons, Splicing).
- **Splicing Zoom Strategy**: Uses a **Hybrid Approach** for optimal
visibility:
1. **Base Interval**: Variant +/- 1 downstream and upstream exon
(Structural Context).
2. **Junction Expansion**: Expands to include the full span of any
**significant splicing junction** (e.g., exon skipping events that
span multiple exons).
3. **Anchor Enforcement**: Ensures the exons *anchoring* these long
junctions are fully visible. *Lesson*: Simple fixed windows (e.g.,
2kb) or nearest-exon logic often fail for skipping events. Always
use the *observed junction data* to drive zoom levels.
- [`examples/splicing/`](docs/examples/splicing/) — Splicing analysis examples
- [`examples/model_limitation_RNU4ATAC/`](docs/examples/model_limitation_RNU4ATAC/)
— ncRNA structure limitation case study
- [`examples/polyadenylation_HBA2/`](docs/examples/polyadenylation_HBA2/) — 3'
UTR / Polyadenylation case study
- [`examples/regulatory/`](docs/examples/regulatory/) — Regulatory variant
examples
- [`examples/negative_result_GATA4/`](docs/examples/negative_result_GATA4/) —
Negative results (mathematical artefact)
- [`examples/negative_result_TGFB3/`](docs/examples/negative_result_TGFB3/) —
Negative results (proxies)
- [`scripts/lookup_gene_info.py`](scripts/lookup_gene_info.py) — Gene &
transcript lookup
- [`scripts/resolve_ontology_terms.py`](scripts/resolve_ontology_terms.py) —
Ontology term resolution (UBERON/CL IDs)
--------------------------------------------------------------------------------
## Code Patterns
### Broad Discovery Scan
Use `score_variant` across **differential scorers only** to discover unexpected
tissue effects.
```python
from alphagenome.models import dna_client
from alphagenome.models import variant_scorers
from alphagenome.data import genome
import os
import pandas as pd
import dotenv
# Load environment variables from ~/.env
dotenv.load_dotenv(os.path.expanduser('~/.env'))
# Setup API Key and Client
dna_model = dna_client.create(api_key=os.environ.get('ALPHAGENOME_API_KEY'),
address='dns:///gdmscience.googleapis.com:443')
# Define Variant (example)
variant_str = "chr2:1234:A>C"
chrom, pos_str, ref_alt = variant_str.split(':')
ref, alt = ref_alt.split('>')
pos = int(pos_str)
# Use supported sequence length (e.g., 2**20 for optimal performance)
SEQ_LENGTH = 2**20
interval = genome.Interval(chrom, pos - SEQ_LENGTH // 2, pos + SEQ_LENGTH // 2)
variant = genome.Variant(chrom, pos, ref, alt)
scorers = [
variant_scorers.RECOMMENDED_VARIANT_SCORERS[m]
for m in variant_scorers.RECOMMENDED_VARIANT_SCORERS
if "ACTIVE" not in m and "CAGE" not in m and "PROCAP" not in m
]
print(f"Scoring variant {variant_str}...")
scores_list = dna_model.score_variant(interval=interval, variant=variant, variant_scorers=scorers)
# Process and Display Results
all_dfs = []
for score_adata in scores_list:
df = variant_scorers.tidy_scores([score_adata], match_gene_strand=True)
if df is not None:
all_dfs.append(df)
if all_dfs:
df = pd.concat(all_dfs)
significant = df[df['quantile_score'].abs() > 0.995]
ranked = significant.sort_values('raw_score', key=abs, ascending=False)
print("Top Significant Hits:")
print(ranked[['biosample_name', 'gene_name', 'output_type', 'quantile_score', 'raw_score']])
```
### Extended Search for Disease-Relevant Tissues
```python
# Define keywords based on disease context
disease_keywords = ["liver", "hepatocyte"]
# Filter for any match
mask = df['biosample_name'].str.contains('|'.join(disease_keywords), case=False, na=False)
relevant_hits = df[mask].sort_values('raw_score', key=abs, ascending=False)
print(f"\n--- Extended Analysis (Keywords: {disease_keywords}) ---")
print(relevant_hits.head(20)[['biosample_name', 'output_type', 'raw_score', 'quantile_score']])
```
## Workflow Checklist
```
Variant Analysis Progress:
- [ ] Step 0: Review Golden Examples (MANDATORY)
- [ ] Step 1: Create Output Folder and Setup
- [ ] Step 2: Parse User Query & Research
- [ ] Step 3: Resolve Tissues & Modalities
- [ ] Step 4: Visualize & Save Plots
- [ ] Step 5: Analyze Predictions (view plots, no code). MANDATORY: Read [interpretation-guide.md](docs/interpretation-guide.md) before interpreting results.
- [ ] Step 6: Write Report, save it as `report.md` (MANDATORY)
- [ ] Step 7: Self-Critique (view `report.md` to verify links & claims)
- [ ] Step 8: Make artifact out of `report.md`
```
--------------------------------------------------------------------------------
## Multi-Variant Workflow
If multiple variants are specified, spawn sub-agents to run each variant
analysis and then synthesize each `report.md` into a single report.
### Script Reference
| Script | Purpose |
| --------------------------- | ---------------------------------------------- |
| `lookup_gene_info` | Comprehensive gene and transcript lookup using |
: : GTF data :
| `resolve_ontology_terms` | Biological terms → UBERON/CL/EFO IDs |
| `visualize_variant_effects` | REF/ALT visualization (expression, regulatory, |
: : splicing) :
| `analyze_ism` | In-Silico Mutagenesis SeqLogo generation |
| `interpret_splicing` | Quantitative splicing analysis (delta scores, |
: : junctions) :
| `visualize_genome_tracks` | Genomic track visualization for a region |
From google-deepmind/science-skills at 6883275, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 6883275Files
- SKILL.md12 KB · bd663b06a6b0
- docs/
- alphagenome-api.md14 KB · cec30a54e212
- examples/
- model_limitation_RNU4ATAC/
- README.md1.8 KB · 0ee033ec5320
- ism_skeletal_muscle_RNA_SEQ.png12 KB · d8c3b41e358b
- plot_skeletal_muscle_RNU4ATAC_detail.png78 KB · 5ce15c8482d6
- plot_skeletal_muscle_RNU4ATAC_effects.png75 KB · 92cc4fc29fb7
- plot_skeletal_muscle_RNU4ATAC_wholegene.png80 KB · cd4a076adffe
- report.md3.8 KB · 6a840668cf98
- negative_result_GATA4/
- README.md1.1 KB · a88a9a0987a3
- ism_heart_DNASE.png12 KB · 8880b2a84a56
- plot_heart_GATA4_detail.png75 KB · 09be7173f716
- plot_heart_GATA4_effects.png72 KB · 6692587b8c65
- plot_heart_GATA4_wholegene.png80 KB · e70a0e056953
- report.md3.7 KB · bd07512e290d
- negative_result_TGFB3/
- README.md1.2 KB · 3874a15712f7
- ism_heart_ATAC.png6.7 KB · 9f8bff86277f
- ism_heart_RNA_SEQ.png11 KB · 35f406d3a498
- plot_heart_TGFB3_detail.png53 KB · 2a97a6c95f18
- plot_heart_TGFB3_effects.png66 KB · fff7aee1ce4b
- plot_heart_TGFB3_wholegene.png45 KB · fc455cdf422a
- report.md3.1 KB · d34b90348e8a
- polyadenylation_HBA2/
- README.md1.1 KB · 4f159ac94589
- ism_K562_RNA_SEQ.png11 KB · 5adb18557d9b
- plot_K562_HBA2_effects.png162 KB · 665379b9dd47
- plot_K562_HBA2_wholegene.png163 KB · d190f95863e4
- report.md3.2 KB · 330bdfcce24c
- regulatory/
- README.md1.2 KB · 2c1065c90a98
- apoa1_promoter/
- ism_heart_left_ventricle_RNA_SEQ.png8.8 KB · 912b47aa33cb
- ism_liver_RNA_SEQ.png8.8 KB · 1573e1606d3b
- plot_heart_left_ventricle_APOA1_effects.png75 KB · df8c9902089e
- plot_liver_APOA1_effects.png227 KB · d460a1b99ab5
- report.md3.5 KB · 258c422c9a54
- splicing/
- README.md1.3 KB · f46fc84659d9
- col6a2_exon_extension.png104 KB · 4015d4246db8
- col6a2_report.md2.3 KB · db7fee721a29
- dlg1_exon_skipping.png75 KB · d807af1868e3
- dlg1_report.md2.0 KB · ef9cd5f08355
- interpretation-guide.md18 KB · 848d3a1dd6b3
- report-templates.md2.9 KB · 77d8f754d13e
- pyproject.toml269 B · 19c607f9cb9a
- references/
- citation.bib823 B · ce7323bda0bd
- scripts/
- analyze_ism.py10 KB · 6382595f5dbd
- generate_ontology_mapping.py5.0 KB · a49450071b8f
- interpret_splicing.py9.7 KB · 04598d8ad5ac
- lookup_gene_info.py10.0 KB · 100eb7e502bb
- resolve_ontology_terms.py5.6 KB · 91e77d77670a
- visualize_genome_tracks.py13 KB · 273009470239
- visualize_variant_effects.py38 KB · b8c22d2cd017
48 files, 1.7 MB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 6883275More from Google
skill-creator
This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.
Contains scripts
Gemini CLI · about 5K tokens · pinned 6 days ago
chrome-devtools-cli
This skill enables agents to automate browser interactions and inspect web pages using Chrome DevTools via command-line interface.
Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago
cloud-run-basics
Deploys and manages Google Cloud Run services, jobs, and worker pools for running containerized applications or source code.
Claude Code, Codex, Cursor +4 · about 3.9K tokens · pinned 6 days ago
retail-virtual-tryon
Creates virtual try-on agents on Google Cloud using Gemini image models and Veo video generation, supporting static image try-ons and catwalk animations.
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.3K tokens · pinned 6 days ago
site-md
This skill analyzes project briefs and generates a .stitch/SITE.md constitution file that documents the project's identity, visual direction, architecture…
Claude Code, Codex, Cursor +4 · about 730 tokens · pinned 6 days ago
stitch::code-to-design
This skill converts existing frontend code (React, Vue, Angular, etc.) into a Stitch Design by extracting HTML, analyzing design systems, and uploading both…
Claude Code, Codex, Cursor +4 · about 760 tokens · pinned 6 days ago
Related in Data and databases
alphagenome-variant-impact-score
Score genetic variants using AlphaGenome Variant Impact models to assess functional impact through 18 biological feature attributions.
by GoogleOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 4.1K tokens · pinned 6 days ago
chdb-datastore
This skill enables working with tabular data using a pandas-compatible API backed by ClickHouse for faster execution.
by ClickHouseOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.2K tokens · pinned 6 days ago
chdb-sql
The skill enables running ClickHouse SQL queries on local files (parquet, csv, json), remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud), and cloud…
by ClickHouseOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 960 tokens · pinned 6 days ago
blueprint
Blueprint enables composing Apache Airflow DAGs from YAML templates using reusable Python task group classes with Pydantic validation.
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 8.3K tokens · pinned 6 days ago
dag-factory
Enables declarative authoring of Apache Airflow DAGs using YAML configuration files via the dag-factory library.
by AstronomerOfficial publisher
Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 6 days ago
databricks-execution-compute
Execute Python, Scala, SQL, or R code on Databricks through three modes: Databricks Connect for local Spark jobs, serverless jobs for heavy processing, or…
by DatabricksOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.2K tokens · pinned 6 days ago
Open roles at Google
No open roles at Google on the Agent Native jobs board right now.
Browse the jobs board