alphagenome-single-variant-analysis
Skill2 starsChanged 3 months agoMITView on GitHub
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.
- Reads credentials
- Installs packages
3 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- Osmosy/vector-geneedited, first seen Oct 13, 2026
- google-deepmind/science-skillsedited, first seen Jul 1, 2026
- uppifyagency/boilerplate-saas-2026edited, first seen Jun 2, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- google-deepmind/science-skills★ 3.4k92% same
- uppifyagency/boilerplate-saas-2026★ 1100% same
- Osmosy/vector-gene★ 092% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository93 other files it gives its agents.
- AGENTS.mdAGENTS.md
- npm/AGENTS.mdAGENTS.md
- advanced-image-slicing-skillSkill
- agents-sdkSkill
- agent-weaver-builderSkill
- alphafold-database-fetch-and-analyzeSkill
- animation-scroll-effectsSkill
- backend-api-shield-servicesSkill
- chembl-databaseSkill
- chronicle-logger-timestampSkill
- cicd-automation-deploySkill
- cinematic-animator-gsapSkill
- clinical-trials-databaseSkill
- clinvar-databaseSkill
- cloudflare-ai-resourcesSkill
- cloudflare-email-serviceSkill
- cloudflare-one-migrationsSkill
- cloudflare-oneSkill
- cloudflareSkill
- data-modeler-schemaSkill
- dbsnp-databaseSkill
- design-system-master-hslSkill
- durable-objectsSkill
- embl-ebi-olsSkill
- encode-ccres-databaseSkill
- ensembl-databaseSkill
- explode-animation-skillSkill
- find-skillsSkill
- foldseek-structural-searchSkill
- frontend-clean-coder-jsSkill
- gnomad-databaseSkill
- google-antigravity-sdkSkill
- gtex-databaseSkill
- human-protein-atlas-databaseSkill
- inner-learner-feedbackSkill
- integrative-architect-docsSkill
- intent-observer-audit360Skill
- interpro-databaseSkill
- isolated-sandbox-environmentSkill
- jaspar-databaseSkill
- k6-load-testingSkill
- lightweight-dep-managerSkill
- literature-search-arxivSkill
- literature-search-biorxivSkill
- literature-search-europepmcSkill
- literature-search-openalexSkill
- maestro-hadi-orchestrationSkill
- majlis-rulesSkill
- marketing-funnel-skillSkill
- ncbi-sequence-fetchSkill
- neuro-marketing-copywriterSkill
- nuclei-security-auditorSkill
- openfda-databaseSkill
- opentargets-databaseSkill
- owasp-zap-api-shieldSkill
- pdb-databaseSkill
- pdf-scan-layer-cleanerSkill
- premium-visual-polish-skillSkill
- protein-sequence-msaSkill
- protein-sequence-similarity-searchSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 2 are common, 0 are distinctive, and 14 are very specific to this project.
2
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
uv: Read the uv skill and follow its Setup instructions to ensure uv is installed and on PATH. - Very specific: line 25
User Notification: If LICENSE_NOTIFICATION.txt does not already exist in this skill directory then (1) prominently notify the user to check …
- Very specific: line 29
.envfile: Make sure the .env file exists in your home directory. - Common: line 30
Create one if it does not exist.
- Very specific: line 49
When running in sandbox, dotenv.load_dotenv() will be a no-op, and instead the sandbox will read credentials and inject them directly.
- Very specific: line 59
Offline Only: NEVER use external APIs (e.g., MyGene.info, Ensembl REST) for gene/transcript lookup.
- Common: line 64
Notification: If this skill is used, ensure this is mentioned in the output.
- Very specific: line 66
Report Format: Always use the templates in docs/report-templates.md for generating analysis reports, and ensure to include the table of top …
- Very specific: line 74
All scripts must be executed using uv run, which manages an isolated virtual environment with the correct dependencies via uv.
- Very specific: line 98
Use --view detail or manual regional windows instead.
- Very specific: line 101
KeyError: 'ontology_curie': Not all tracks have ontology_curie.
- Very specific: line 103
Python Path: If exec: "python": executable file not found occurs, ensure you are using uv run instead of bare python/python3.
- Very specific: line 122
uvNot Found: If exec: uv: not found, follow the installation instructions in Prerequisites. - Very specific: line 124
Registry Authentication Error (401): If uv fails with 401 Unauthorized for a private registry, set UV_INDEX_URL=https://pypi.org/simple …
- Very specific: line 170
Use score_variant across differential scorers only to discover unexpected tissue effects.
- Very specific: line 252
If multiple variants are specified, spawn sub-agents to run each variant analysis and then synthesize each report.md into a single report.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Variant Analysis using AlphaGenome
Prerequisites
uv: Read theuvskill and follow its Setup instructions to ensureuvis installed and on PATH.- User Notification: If LICENSE_NOTIFICATION.txt does not already exist in this skill 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.
.envfile: 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 must ask the user for an API key if this skill looks relevant to their request and you do not have one in .env. The user can sign up at https://deepmind.google.com/science/alphagenome/. Do NOT ask the user to paste their key into the chat (this would leak the key into the agent's context). Instead, explain that a key is necessary to use AlphaGenome and give the user this command substitutingENV_FILEwith the resolved literal path to the.envfile:printf "Enter AlphaGenome API key (typing hidden): " && read -s key && echo && echo "ALPHAGENOME_API_KEY=$key" >> "ENV_FILE" && echo "Saved."The scripts load credentials automatically via
dotenv. NEVER read, print, or inspect the.envfile or its variables (e.g. nocat,grep,echo,printenv, oros.environ.geton keys). Credentials must stay out of the agent's context.When running in sandbox,
dotenv.load_dotenv()will be a no-op, and instead the sandbox will read credentials and inject them directly.
Core Rules
- NEVER run
python3orpython3 -cdirectly. The system Python does not necessarily have pandas, numpy, and other key dependencies. ALWAYS useuv 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 (in sandbox, credentials are injected automatically). - 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_variantontology 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. uvNot Found: Ifexec: 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.
- Splicing Zoom Strategy: Uses a Hybrid Approach for optimal
visibility:
examples/splicing/— Splicing analysis examplesexamples/model_limitation_RNU4ATAC/— ncRNA structure limitation case studyexamples/polyadenylation_HBA2/— 3' UTR / Polyadenylation case studyexamples/regulatory/— Regulatory variant examplesexamples/negative_result_GATA4/— Negative results (mathematical artefact)examples/negative_result_TGFB3/— Negative results (proxies)scripts/lookup_gene_info.py— Gene & transcript lookupscripts/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
# 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
# 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 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

