Alphagenome Single Variant Analysis
Google DeepMindOfficialPublished by Google DeepMind
- Skill
- Tool integration
- Science and research
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The AlphaGenome Single Variant Analysis skill provides a structured workflow for investigating how specific genetic variants influence biological processes. It leverages the AlphaGenome API to predict effects on RNA-seq expression, chromatin accessibility, histone marks, and transcription factor binding. The skill includes robust procedures for resolving biological ontologies, performing discovery scans for tissue-specific effects, and visualizing variant impacts through detailed genomic tracks and splicing analysis. It emphasizes rigorous interpretation through standardized reporting templates and mandatory adherence to provided interpretation guides.
What it does
- Performs discovery scans to identify significant variant effects across diverse tissues and modalities.
- Resolves biological terms and tissue/cell-type names to standard UBERON/CL ontologies.
- Visualizes variant effects on gene expression, splicing, and regulatory regions.
- Generates structured, evidence-based analysis reports following predefined templates.
- Supports in-silico mutagenesis (ISM) and quantitative splicing analysis.
- Provides tools for local gene and transcript lookup using GTF data.
When to use it
- When investigating the functional consequences of non-coding genetic variants.
- When assessing the pathogenicity or clinical significance of a variant in a specific disease context.
- When analyzing how a variant disrupts regulatory elements like promoters and enhancers.
- When exploring tissue-specific gene expression changes or splicing disruption caused by a variant.
- When you need to map biological terms to standardized ontologies for downstream analysis.
Advantages
- Provides a standardized, reproducible workflow for complex genomic variant interpretation.
- Integrates multi-omic data types (RNA-seq, DNASE, ChIP) for comprehensive functional insights.
- Includes specific strategies for handling complex events like splicing skipping and large genes.
- Enforces rigorous reporting standards to ensure consistency and clarity in findings.
- Utilizes local GTF data for efficient and offline-capable gene lookups.
Usage examples
- “Analyze the functional impact of the variant chr2:1234:A>C in liver tissue.”
- The agent will perform a discovery scan, filter for liver-related biosamples, generate visualization plots for the variant, and produce a structured report detailing the predicted regulatory and expression effects.
- “What is the effect of chr1:5000:G>T on splicing in neurons?”
- The agent will use the interpret_splicing script to quantify delta scores and junction changes, visualize the splicing event with appropriate flanking exons, and summarize the findings in a report.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google-deepmind/alphagenome-single-variant-analysis/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip alphagenome-single-variant-analysis.zip -d .agents/skills
Documentation by Google DeepMind
Variant Analysis using AlphaGenome
Prerequisites
uv: Read theuvskill 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.
.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 can register for a key at https://deepmind.google.com/science/alphagenome/. You MUST use the safe credentials protocol in the
credentialsskill 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" >> ~/.env
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.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.
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
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
# 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 |
Files
- ATTRIBUTION.mdAdded by AutoGineer952 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md11.7 KiB
- docs/alphagenome-api.md13.3 KiB
- docs/examples/model_limitation_RNU4ATAC/README.md1.7 KiB
- docs/examples/model_limitation_RNU4ATAC/ism_skeletal_muscle_RNA_SEQ.png12.1 KiB
- docs/examples/model_limitation_RNU4ATAC/plot_skeletal_muscle_RNU4ATAC_detail.png76.3 KiB
- docs/examples/model_limitation_RNU4ATAC/plot_skeletal_muscle_RNU4ATAC_effects.png72.9 KiB
- docs/examples/model_limitation_RNU4ATAC/plot_skeletal_muscle_RNU4ATAC_wholegene.png78.3 KiB
- docs/examples/model_limitation_RNU4ATAC/report.md3.7 KiB
- docs/examples/negative_result_GATA4/README.md1.1 KiB
- docs/examples/negative_result_GATA4/ism_heart_DNASE.png11.7 KiB
- docs/examples/negative_result_GATA4/plot_heart_GATA4_detail.png73.5 KiB
- docs/examples/negative_result_GATA4/plot_heart_GATA4_effects.png70.2 KiB
- docs/examples/negative_result_GATA4/plot_heart_GATA4_wholegene.png78.2 KiB
- docs/examples/negative_result_GATA4/report.md3.6 KiB
- docs/examples/negative_result_TGFB3/README.md1.2 KiB
- docs/examples/negative_result_TGFB3/ism_heart_ATAC.png6.5 KiB
- docs/examples/negative_result_TGFB3/ism_heart_RNA_SEQ.png10.3 KiB
- docs/examples/negative_result_TGFB3/plot_heart_TGFB3_detail.png51.5 KiB
- docs/examples/negative_result_TGFB3/plot_heart_TGFB3_effects.png64.0 KiB
- docs/examples/negative_result_TGFB3/plot_heart_TGFB3_wholegene.png43.9 KiB
- docs/examples/negative_result_TGFB3/report.md3.0 KiB
- docs/examples/polyadenylation_HBA2/README.md1.1 KiB
- docs/examples/polyadenylation_HBA2/ism_K562_RNA_SEQ.png10.8 KiB
- docs/examples/polyadenylation_HBA2/plot_K562_HBA2_effects.png158.5 KiB
- docs/examples/polyadenylation_HBA2/plot_K562_HBA2_wholegene.png159.3 KiB
- docs/examples/polyadenylation_HBA2/report.md3.1 KiB
- docs/examples/regulatory/README.md1.2 KiB
- docs/examples/regulatory/apoa1_promoter/ism_heart_left_ventricle_RNA_SEQ.png8.6 KiB
- docs/examples/regulatory/apoa1_promoter/ism_liver_RNA_SEQ.png8.6 KiB
- docs/examples/regulatory/apoa1_promoter/plot_heart_left_ventricle_APOA1_effects.png73.0 KiB
- docs/examples/regulatory/apoa1_promoter/plot_liver_APOA1_effects.png221.5 KiB
- docs/examples/regulatory/apoa1_promoter/report.md3.4 KiB
- docs/examples/splicing/README.md1.3 KiB
- docs/examples/splicing/col6a2_exon_extension.png101.4 KiB
- docs/examples/splicing/col6a2_report.md2.2 KiB
- docs/examples/splicing/dlg1_exon_skipping.png73.1 KiB
- docs/examples/splicing/dlg1_report.md1.9 KiB
- docs/interpretation-guide.md17.4 KiB
- docs/report-templates.md2.8 KiB
- pyproject.toml269 B
- references/citation.bib823 B
- scripts/analyze_ism.pyScript10.1 KiB
- scripts/generate_ontology_mapping.pyScript4.8 KiB
- scripts/interpret_splicing.pyScript9.5 KiB
- scripts/lookup_gene_info.pyScript9.8 KiB
- scripts/resolve_ontology_terms.pyScript5.5 KiB
- scripts/visualize_genome_tracks.pyScript12.4 KiB
- scripts/visualize_variant_effects.pyScript37.0 KiB
scripts/analyze_ism.py
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
r"""Generate ISM Sequence Logo for a variant.
Design Note:
This tool generates ISM Sequence Logos to identify disrupted motifs at the
variant position, helping explain *why* a regulatory or splicing site was
lost or gained (mechanistic cause).
The script extracts the top k-mer and prints its reverse complement.
The agent must use its own knowledge about transcription factor binding
motifs to identify candidate TFs that match the extracted motif or its
reverse complement.
Usage:
uv run analyze_ism.py --chrom=chr17 --pos=7675148 --ref=G --alt=A \
--tissue=liver --ontology=UBERON:0002107 --modality=DNASE
Examples:
uv run analyze_ism.py --chrom=chr17 --pos=7675148 --ref=G --alt=A \
--tissue=liver --ontology=UBERON:0002107 --modality=DNASE
uv run analyze_ism.py --chrom=chr21 --pos=46126238 --ref=G --alt=C \
--tissue='skeletal muscle' --ontology=CL:0002545 --modality=SPLICE_SITE_USAGE \
--gene=COL6A2
uv run analyze_ism.py --chrom=chr7 --pos=5529776 --ref=C --alt=T \
--tissue=HepG2 --ontology=EFO:0001187 --modality=CHIP_TF --gene=ACTB \
--output_dir=./ism_plots
"""
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "alphagenome",
# "numpy",
# "python-dotenv",
# ]
# ///
from __future__ import annotations
import argparse
import os
from typing import Any, Sequence
from alphagenome.data import genome
from alphagenome.interpretation import ism
from alphagenome.models import dna_client
from alphagenome.models import variant_scorers
from alphagenome.visualization import plot_components
import dotenv
import numpy as np
def _reverse_complement(seq: str) -> str:
"""Returns the reverse complement of a DNA sequence."""
return seq[::-1].translate(str.maketrans('ACGTacgt', 'TGCAtgca'))
def extract_ontology_scores(
ism_results: list[tuple[Any, ...]],
ontology_id: str,
gene_name: str | None = None,
) -> tuple[list[float], list[Any]]:
"""Extracts scores for a specific ontology ID from ISM results."""
scores_flat: list[float] = []
variants_flat: list[Any] = []
for adata, *_ in ism_results:
var_obj = adata.uns['variant']
score = 0.0
if 'ontology_curie' in adata.var.columns:
col_mask = adata.var['ontology_curie'] == ontology_id
if col_mask.any():
row_mask = slice(None) # All rows
if gene_name and 'gene_name' in adata.obs.columns:
gene_mask = adata.obs['gene_name'] == gene_name
if gene_mask.any():
row_mask = gene_mask
score = np.nanmean(adata.X[row_mask, col_mask])
else:
print(
'Info: No scores found for ontology term'
f' {ontology_id!r} in ISM result.'
)
scores_flat.append(score)
variants_flat.append(var_obj)
return scores_flat, variants_flat
def interpret_ism_matrix(
ref_ism_mat: np.ndarray,
bases: list[str],
kmer_length: int,
min_threshold: float,
) -> None:
"""Prints interpretation summary from an ISM matrix."""
print('\n--- ISM Interpretation Summary ---')
if not np.any(ref_ism_mat):
print('ISM matrix is all zeros. No relevant tracks or scores found.')
return
max_scores_per_pos = np.max(np.abs(ref_ism_mat), axis=1)
top_pos_idx = int(np.argmax(max_scores_per_pos))
top_score = ref_ism_mat[top_pos_idx, :]
center_idx = ref_ism_mat.shape[0] // 2
print(
f'Top Disrupted Position: {top_pos_idx - center_idx} (Relative to'
' Variant)'
)
print(f'Scores at Top Position: {dict(zip(bases, top_score))}')
# Use relative threshold but ensure it's at least min_threshold
threshold = max(np.max(np.abs(ref_ism_mat)) * 0.1, min_threshold)
consensus_seq: list[str] = []
for i in range(ref_ism_mat.shape[0]):
row = ref_ism_mat[i, :]
best_idx = np.argmax(np.abs(row))
if abs(row[best_idx]) > threshold:
consensus_seq.append(bases[best_idx])
else:
consensus_seq.append('.')
consensus_str = ''.join(consensus_seq)
print(f'Consensus Motif: {consensus_str}')
print(f'Reverse Compl : {_reverse_complement(consensus_str)}')
if ref_ism_mat.shape[0] >= kmer_length:
best_kmer_score = -1.0
best_kmer_seq = ''
best_kmer_start = 0
for i in range(ref_ism_mat.shape[0] - kmer_length + 1):
window = ref_ism_mat[i : i + kmer_length, :]
score = np.sum(np.max(np.abs(window), axis=1))
if score > best_kmer_score:
best_kmer_score = score
best_kmer_start = i
seq = ''
for j in range(kmer_length):
w_row = window[j, :]
seq += bases[np.argmax(np.abs(w_row))]
best_kmer_seq = seq
print(
f'Top {kmer_length}-mer: {best_kmer_seq}'
f' (Start: {best_kmer_start - center_idx},'
f' Score: {best_kmer_score:.3f})'
)
print(f'RevComp {kmer_length}-mer: {_reverse_complement(best_kmer_seq)}')
print('----------------------------------\n')
def analyze_ism(
chrom: str,
pos: int,
ref: str,
alt: str,
tissue: str,
ontology: str,
modality: str,
gene: str,
output_dir: str,
kmer_length: int,
min_threshold: float,
) -> None:
"""Runs In-Silico Mutagenesis (ISM) analysis and plots the results."""
api_key = os.environ.get('ALPHAGENOME_API_KEY')
if not api_key:
raise ValueError('ALPHAGENOME_API_KEY not found.')
print('Initializing AlphaGenome Client...')
dna_model = dna_client.create(
api_key=api_key,
address='dns:///gdmscience.googleapis.com:443',
)
variant = genome.Variant(chrom, pos, ref, alt)
print(f'Variant: {variant}')
ism_interval = variant.reference_interval.resize(32)
sequence_interval = ism_interval.resize(dna_client.SEQUENCE_LENGTH_1MB)
try:
output_type = dna_client.OutputType[modality.upper()]
except KeyError as e:
raise ValueError(
f'Unknown modality: {modality}. Valid options:'
f' {[o.name for o in dna_client.OutputType]}'
) from e
if output_type == dna_client.OutputType.SPLICE_JUNCTIONS:
raise ValueError(
'SPLICE_JUNCTIONS is NOT supported for ISM. Please use'
' SPLICE_SITE_USAGE instead.'
)
print(f'Scoring ISM for {tissue} ({output_type.name})...')
modality_key = modality.upper()
if modality_key in variant_scorers.RECOMMENDED_VARIANT_SCORERS:
ism_scorer = variant_scorers.RECOMMENDED_VARIANT_SCORERS[modality_key]
else:
raise ValueError(
f'No recommended scorer found for modality: {modality_key}. '
'Available recommended scorers: '
f'{list(variant_scorers.RECOMMENDED_VARIANT_SCORERS.keys())}'
)
print('Running ISM on REF background...')
ref_ism_results = dna_model.score_ism_variants(
interval=sequence_interval,
ism_interval=ism_interval,
variant_scorers=[ism_scorer],
)
ref_scores, ref_variants = extract_ontology_scores(
ref_ism_results, ontology, gene_name=gene
)
ref_ism_mat = ism.ism_matrix(ref_scores, variants=ref_variants)
max_score = np.max(np.abs(ref_ism_mat))
if max_score == 0:
print('WARNING: ISM matrix is empty (all zeros). Check ontology ID.')
elif max_score < min_threshold:
print(
f'WARNING: Max ISM score is very low ({max_score:.3f}), below'
f' threshold {min_threshold}. The result may not be reliable.'
)
print('Generating SeqLogo...')
fig = plot_components.plot(
[
plot_components.SeqLogo(
scores=ref_ism_mat,
scores_interval=ism_interval,
ylabel=f'ISM {tissue}\n{output_type.name}',
)
],
interval=ism_interval,
fig_width=15,
title=f'ISM Motif Analysis: {gene} {chrom}:{pos} ({tissue})',
annotations=[plot_components.VariantAnnotation([variant], alpha=0.5)],
)
safe_tissue = tissue.replace(' ', '_').replace('/', '_')
filename = os.path.join(output_dir, f'ism_{safe_tissue}_{modality}.png')
os.makedirs(output_dir, exist_ok=True)
fig.savefig(filename)
print(f'Saved ISM SeqLogo to {filename}')
bases = ['A', 'C', 'G', 'T']
interpret_ism_matrix(ref_ism_mat, bases, kmer_length, min_threshold)
def main(argv: Sequence[str] | None = None) -> None:
"""Main entry point for the ISM analysis CLI tool."""
dotenv.load_dotenv(os.path.expanduser('~/.env'))
parser = argparse.ArgumentParser(
description='Generate ISM Sequence Logo for a variant.'
)
parser.add_argument(
'--chrom',
required=True,
help='Chromosome (e.g., chr17).',
)
parser.add_argument(
'--pos', type=int, required=True, help='Position (1-based).'
)
parser.add_argument('--ref', required=True, help='Reference allele.')
parser.add_argument('--alt', required=True, help='Alternate allele.')
parser.add_argument(
'--tissue', required=True, help='Tissue name for labeling.'
)
parser.add_argument(
'--ontology', required=True, help='Ontology CURIE (e.g., UBERON:0002107).'
)
parser.add_argument(
'--modality',
required=True,
help='Output modality (e.g., DNASE, CHIP_TF).',
)
parser.add_argument(
'--gene', default='Unknown', help='Gene name for plot title.'
)
parser.add_argument('--output_dir', default='.', help='Output directory.')
parser.add_argument(
'--kmer_length',
type=int,
default=8,
help='Length of k-mer to scan for top score.',
)
parser.add_argument(
'--min_threshold',
type=float,
default=0.05,
help='Minimum absolute score threshold for motif extraction.',
)
args = parser.parse_args(argv)
analyze_ism(
args.chrom,
args.pos,
args.ref,
args.alt,
args.tissue,
args.ontology,
args.modality,
args.gene,
args.output_dir,
args.kmer_length,
args.min_threshold,
)
if __name__ == '__main__':
main()
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an API key, Needs Python
Security
What our scanner noticed· Low risk
- Instructions that use the network
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Google DeepMind
- Publisher
- Google DeepMind (Official)
- Source
- google-deepmind/science-skills · skills/alphagenome_single_variant_analysis · commit 4de6786
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google DeepMind or Google DeepMind.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download alphagenome-single-variant-analysis.zip