marceloclaro/opencode_ecosystem/alphagenome-single-variant-analysis
Claude Code and agent skill by marceloclaro/opencode_ecosystem
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install marceloclaro/opencode_ecosystem/alphagenome-single-variant-analysisSKILL.md
The same SKILL.md was published earlier as marceloclaro/opencode_ecosystem/alphagenome-single-variant-analysis.
Variant Analysis using AlphaGenome
Prerequisites
- `uv`: Read the
uvskill and follow its Setup instructions to ensure
uv is 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.
- `.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 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 substituting `ENV_FILE` with the resolved literal path to the `.env` file:
``bash 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 .env file or its variables (e.g. no cat, grep, echo, printenv, or os.environ.get on 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 `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_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.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.
For ad-hoc scripts (e.g., inline analysis code saved to a temp file), pass the full path instead of a short name:
[!NOTE] The first invocation resolves and installs dependencies (~10s).Subsequent runs use the cached environment and start instantly. The cachelives in~/.cache/uv/.
Common Issues
- Column Names:
tidy_scoresand metadata often usegene_name(not
gene_symbol) and output_type (not modality). Always inspect df.columns before filtering.
- Large Genes: Genes > 500kb (e.g.,
USH2A) break thewhole_geneview.
Use --view detail or manual regional windows instead.
- Sashimi Strand Error:
plot_components.Sashimidoes 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 foundoccurs,
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_variantdoes 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
Junctionobjects frompredictionmay 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.
- Registry Authentication Error (401): If
uvfails with 401 Unauthorized
for a private registry, set UV_INDEX_URL=https://pypi.org/simple before 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
UTR / Polyadenylation case study
- `examples/regulatory/` — Regulatory variant
examples
Negative results (mathematical artefact)
Negative results (proxies)
- `scripts/lookup_gene_info.py` — Gene &
transcript lookup
Ontology term resolution (UBERON/CL IDs)
Code Patterns
Broad Discovery Scan
Use score_variant across differential scorers only to discover unexpected tissue effects.
Extended Search for Disease-Relevant Tissues
Workflow Checklist
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) :
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/science/alphagenome_single_variant_analysis/SKILL.md
Popularity
- Repository stars
- 9
- Repository forks
- 2
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/marceloclaro/opencode_ecosystem/alphagenome-single-variant-analysis)