- Skill ID
- google-deepmind/science-skills/alphagenome-single-variant-analysis
- Publisher
- google-deepmind
- Repository
- science-skills
- Installs
- 0
- Files
- 48
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
google-deepmind/science-skills/alphagenome-single-variant-analysisInstalls these files- SKILL.md
- docs/alphagenome-api.md
- docs/examples/model_limitation_RNU4ATAC/README.md
- docs/examples/model_limitation_RNU4ATAC/ism_skeletal_muscle_RNA_SEQ.png
- docs/examples/model_limitation_RNU4ATAC/plot_skeletal_muscle_RNU4ATAC_detail.png
- docs/examples/model_limitation_RNU4ATAC/plot_skeletal_muscle_RNU4ATAC_effects.png
- docs/examples/model_limitation_RNU4ATAC/plot_skeletal_muscle_RNU4ATAC_wholegene.png
- docs/examples/model_limitation_RNU4ATAC/report.md
- docs/examples/negative_result_GATA4/README.md
- docs/examples/negative_result_GATA4/ism_heart_DNASE.png
- docs/examples/negative_result_GATA4/plot_heart_GATA4_detail.png
- docs/examples/negative_result_GATA4/plot_heart_GATA4_effects.png
- docs/examples/negative_result_GATA4/plot_heart_GATA4_wholegene.png
- docs/examples/negative_result_GATA4/report.md
- docs/examples/negative_result_TGFB3/README.md
- docs/examples/negative_result_TGFB3/ism_heart_ATAC.png
- docs/examples/negative_result_TGFB3/ism_heart_RNA_SEQ.png
- docs/examples/negative_result_TGFB3/plot_heart_TGFB3_detail.png
- docs/examples/negative_result_TGFB3/plot_heart_TGFB3_effects.png
- docs/examples/negative_result_TGFB3/plot_heart_TGFB3_wholegene.png
- docs/examples/negative_result_TGFB3/report.md
- docs/examples/polyadenylation_HBA2/README.md
- docs/examples/polyadenylation_HBA2/ism_K562_RNA_SEQ.png
- docs/examples/polyadenylation_HBA2/plot_K562_HBA2_effects.png
- docs/examples/polyadenylation_HBA2/plot_K562_HBA2_wholegene.png
- docs/examples/polyadenylation_HBA2/report.md
- docs/examples/regulatory/README.md
- docs/examples/regulatory/apoa1_promoter/ism_heart_left_ventricle_RNA_SEQ.png
- docs/examples/regulatory/apoa1_promoter/ism_liver_RNA_SEQ.png
- docs/examples/regulatory/apoa1_promoter/plot_heart_left_ventricle_APOA1_effects.png
- docs/examples/regulatory/apoa1_promoter/plot_liver_APOA1_effects.png
- docs/examples/regulatory/apoa1_promoter/report.md
- docs/examples/splicing/README.md
- docs/examples/splicing/col6a2_exon_extension.png
- docs/examples/splicing/col6a2_report.md
- docs/examples/splicing/dlg1_exon_skipping.png
- docs/examples/splicing/dlg1_report.md
- docs/interpretation-guide.md
- docs/report-templates.md
- pyproject.toml
- references/citation.bib
- scripts/analyze_ism.py
- scripts/generate_ontology_mapping.py
- scripts/interpret_splicing.py
- scripts/lookup_gene_info.py
- scripts/resolve_ontology_terms.py
- scripts/visualize_genome_tracks.py
- scripts/visualize_variant_effects.py
What this skill tells the agent
Variant Analysis using AlphaGenome
Prerequisites
- `uv`: Read the
uvskill and follow its Setup instructions to ensureuvis installed and on PATH. - 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.
- `.env` file: Make sure the
.envfile exists in your home directory. Create one if it does not exist. - `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.
- `ALPHAGENOME_GTF_PATH` (Optional): Accelerate gene/transcript lookup by pointing to a local copy of the GTF feather file instead of downloading from GCS:
echo "ALPHAGENOME_GTF_PATH=/path/to/local/gencode.v46.annotation.gtf.gz.feather" >> ~/.envCore Rules
- NEVER run `python3` or `python3 -c` directly. The system Python does not necessarily have pandas, numpy, and other key dependencies. ALWAYS use
uv runto run ALL Python code — including scripts, ad-hoc analysis files, and one-liners. Do not attempt topip installor create new venvs —uvmanages an isolated environment automatically. - Offline Only: NEVER use external APIs (e.g., MyGene.info, Ensembl REST) for gene/transcript lookup. Use
lookup_gene_info.pywith the local GTF. If it fails, fix the environment/paths, do not switch to external APIs. - API Key is required:
ALPHAGENOME_API_KEYmust 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.mdfor 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.
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:
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_scoresand metadata often usegene_name(notgene_symbol) andoutput_type(notmodality). Always inspectdf.columnsbefore filtering. - Large Genes: Genes > 500kb (e.g.,
USH2A) break thewhole_geneview. Use--view detailor manual regional windows instead. - Sashimi Strand Error:
plot_components.Sashimidoes NOT accept astrandargument directly. Filter input tracks instead. - KeyError: 'ontology_curie': Not all tracks have
ontology_curie. Checktrack.metadata.columnsbefore filtering. - Python Path: If
exec: "python": executable file not foundoccurs, ensure you are usinguv runinstead of barepython/python3. - NotImplementedError (pandas): "iLocation based boolean indexing on an integer type is not available". This occurs when using boolean masks with
.ilocon integer-indexed DataFrames in newer pandas versions. Fix: Convert boolean masks to integer indices usingnp.flatnonzero(mask). - GTF Feather Case Sensitivity: The AlphaGenome GTF Feather file uses Capitalized column names (
Feature,Start,End,Strand) unlike standard GTF files. Always checkdf.columnsif getting KeyErrors. - `score_variant` ontology filtering:
score_variantdoes NOT acceptontology_termsas an argument. You must filter the returned AnnData objects manually by inspectingadata.varcolumns. In contrast,predict_variantDOES acceptontology_termsdirectly. - 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
Junctionobjects frompredictionmay be simple Intervals. Usejunction_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. - Registry Authentication Error (401): If
uvfails with 401 Unauthorized for a private registry, setUV_INDEX_URL=https://pypi.org/simplebefore running the script.
References
- alphagenome-api.md — API reference and code patterns
- interpretation-guide.md — Interpretation guide, score magnitude rules, ISM, and checklist.
- report-templates.md — Full report templates
- `scripts/visualize_variant_effects.py` — Single-variant visualization template (Ref/Alt comparisons, Splicing).
- Splicing Zoom Strategy: Uses a Hybrid Approach for optimal visibility:
- Base Interval: Variant +/- 1 downstream and upstream exon (Structural Context).
- Junction Expansion: Expands to include the full span of any significant splicing junction (e.g., exon skipping events that span multiple exons).
- 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/` — Splicing analysis examples
- `examples/model_limitation_RNU4ATAC/` — ncRNA structure limitation case study
- `examples/polyadenylation_HBA2/` — 3' UTR / Polyadenylation case study
- `examples/regulatory/` — Regulatory variant examples
- `examples/negative_result_GATA4/` — Negative results (mathematical artefact)
- `examples/negative_result_TGFB3/` — Negative results (proxies)
- `scripts/lookup_gene_info.py` — Gene & transcript lookup
- `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.
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)
More from google-deepmind
Use this skill in a project
Open any RiverX project, search the Skills panel for google-deepmind/science-skills/alphagenome-single-variant-analysis, and install it in one click.
