Loading...
Loading...
Score, annotate, and analyze the functional impact of genetic variants using AlphaGenome Variant Impact (AVI) scores. Query variants in chr:pos:ref>alt format, annotate VCF/tabular callsets, perform saturation mutagenesis window scans (1-based closed chr:start-end), and extract GENCODE v46 GTF gene/exon/junction coordinates all via the AlphaGenome Atlas API.
npx skill4agent add google-deepmind/science-skills alphagenome-variant-impact-scorescripts/alphagenome_atlas_avi.py[!IMPORTANT] Research Use Only & Clinical Safety Rules: The AlphaGenome AVI Skill and the underlying AlphaGenome model/Atlas are strictly research tools. Access to outputs requires an AlphaGenome API key subject to terms of service prohibiting clinical use.
- No Medical Advice or Clinical Diagnosis: You MUST NOT provide medical advice, clinical diagnoses, disease management strategies, or treatment recommendations based on outputs from this skill or the AlphaGenome Atlas.
- Strict Molecular & Functional Framing: A high AVI score reflects predicted molecular/functional impact (e.g., disruption of splicing, alteration of transcription factor binding, chromatin accessibility changes, or coding consequences). Frame all findings in terms of molecular mechanisms and biological annotations—never as clinical diagnoses or medical conclusions.
- No Diagnostic Leaps: Never extrapolate high functional impact to clinical disease causation, penetrance, or patient prognosis. If a user asks a clinical or diagnostic question, explicitly clarify that AlphaGenome is a research tool and restrict your answer to the predicted molecular and functional effects.
[!IMPORTANT] Always Use AlphaGenome GENCODE v46 GTF () for Gene Annotations: When retrieving gene models, transcript IDs, exon coordinates, CDS/UTR regions, or splice junction donor/acceptor boundaries, always use the built-inscripts/alphagenome_atlas_avi.py gtfcommand. Do NOT query external sources (e.g., Ensembl REST API, UCSC, external GTF databases, or NCBI) for gene annotations or transcript coordinates. This ensures that the annotations match the scores and website.scripts/alphagenome_atlas_avi.py gtf
scripts/alphagenome_atlas_avi.pyuv run# Display CLI help:
uv run scripts/alphagenome_atlas_avi.py --help[!TIP] Agent & Programmatic Execution Format: When invoking the CLI in agent workflows, preferor direct file export (--format json) for deterministic, structured parsing rather than extracting fields from stdout markdown tables.-o <file>
querychr:pos:ref>alt# Query single variant with basic feature importances (stdout JSON preview):
uv run scripts/alphagenome_atlas_avi.py query "chr9:128225994:G>A" --format json
# Query variant with exact underlying Atlas track indices, biosamples, and target genes:
uv run scripts/alphagenome_atlas_avi.py query "chr9:128225994:G>A" --include_track_info --format json
# Query multiple variants and export full track info to a file (prevents stdout overflow):
uv run scripts/alphagenome_atlas_avi.py query "chr9:128225994:G>A" "chr22:36201698:A>C" \
--include_track_info --format json -o query_results.json--include_track_info --format json-o <file.json>-o <file.tsv>annotateCSQuv run scripts/alphagenome_atlas_avi.py annotate \
--input test_data/example_variants.vcf \
--output annotated_variants.vcf \
--top_k 20 \
--min_phred 15.0 \
--top_output top_variants.jsonannotate--output.vcf.vcf.gz.parquet.tsv.csv--top_output <file.json>regionchr:start-enduv run scripts/alphagenome_atlas_avi.py region \
--region chr9:128225990-128226000 \
--min_phred 15.0 \
--top_k 20 \
--output region_hotspots.tsv--output <file.tsv|parquet>--max_window_sizemetadata# List all registered scorers:
uv run scripts/alphagenome_atlas_avi.py metadata --scorers --format json
# List the 18 biological feature attribution modalities:
uv run scripts/alphagenome_atlas_avi.py metadata --features --format json
# Search experimental tracks by query keyword with a controlled preview (top 20):
uv run scripts/alphagenome_atlas_avi.py metadata --tracks --query "GATA1" --top_n 20
# Dump complete 9,440-track catalog to Parquet or TSV for offline search:
uv run scripts/alphagenome_atlas_avi.py metadata --tracks --output atlas_tracks.parquet--features--scorers--query--top_n 20--output atlas_tracks.parquetgtf# Query MANE Select exon boundaries for a gene (stdout JSON preview):
uv run scripts/alphagenome_atlas_avi.py gtf --gene CAPN3 --exons --format json
# Query canonical and exon-skipping splice junctions for a variant locus:
uv run scripts/alphagenome_atlas_avi.py gtf --variant "chr15:42387805:C>G" --junctions --format json
# Extract CDS and UTR segments for an Ensembl transcript ID:
uv run scripts/alphagenome_atlas_avi.py gtf --transcript_id ENST00000397163.8 --cds --utr --format json--exons--output <file.tsv|parquet>> gtf_out.json--all_transcripts--region--format jsonTTNDMDatlas.create(api_key)atlas.AtlasClient()genome.Interval[start, end)chr:start_1_based-end_1_basedstart = start_1_based - 1end = end_1_basedgenome.Variant.from_str("chr:pos:ref>alt")import os
from alphagenome.atlas import atlas
from alphagenome.data import genome
import dotenv
dotenv.load_dotenv(os.path.expanduser('~/.env'))
client = atlas.create(os.environ['ALPHAGENOME_API_KEY'])
# Query 1-based closed interval chr11:5225727-5226575 using 0-based half-open [5225726, 5226575)
interval = genome.Interval(chromosome='chr11', start=5225726, end=5226575)
results = client.query_interval(
interval,
requested_scorers=['AVI_SCORE', 'AVI_SCORE_FEATURE_IMPORTANCE'],
)
# Query single variant with 1-based coordinate
variant = genome.Variant.from_str('chr11:5225488:A>T')
variant_scores = client.query_variant(
variant,
requested_scorers=['AVI_SCORE', 'AVI_SCORE_FEATURE_IMPORTANCE'],
)annotateCSQAllele|AVI_PHRED|AVI_RAW|AVI_QUANTILE|AVI_TOP_PERCENTILE|AVI_TOP_FEATUREAlleleAAVI_PHRED[0.0, ~70.0]AVI_RAWAVI_QUANTILE(0.0, 1.0]AVI_TOP_PERCENTILE0.0380AVI_TOP_FEATURESplicingAlphaMissenseChIP-TFDNASE-seqCactus--vep_csq_onlyAVI_PHRED=FloatAVI_RAW=FloatAVI_QUANTILE=FloatAVI_TOP_PERCENTILE=FloatAVI_TOP_FEATURE=Stringqueryregion--top_outputrank--top_outputregionvariantchr:pos_1_based:ref>altchr9:128225994:G>Achromosomechrchr9positionrefaltavi_phredavi_rawavi_quantiletop_percentile0.3421top_modalitySplicingAlphaMissenseChIP-TFtop_feature_importance--include_featuresfi_<MODALITY>fi_MERGED_SPLICINGfi_ALPHAMISSENSEfi_MAX_ABS_RNA_SEQfi_CACTUS_241_WAY--include_track_infotrack_idx_<MODALITY>track_name_<MODALITY>track_biosample_<MODALITY>track_gene_<MODALITY>gtfgtf --format jsongene_namegene_idtranscript_idtranscript_typechromosomestartendstrandis_mane_selectnum_exons--exonsexon_numberstartendwidthacceptordonoroverlaps_variant--junctionstypeCanonical Intron {i}Exon {k} Skippingupstream_exondownstream_exonjunction_startjunction_endintron_lengthscore_idatlas_url--cds--utrstartendwidthPhred = -10 * log10(1.0 - quantile)Phred >= 40Phred >= 30Phred >= 20Phred >= 15Phred >= 10Phred < 10Top Percentile = 10^(-Phred/10) * 100%metadata --features[!IMPORTANT] Mandatory Atlas Deep-Linking with Variant Scores: Whenever reporting, discussing, or displaying an AVI score for a variant (whether for a single variant query, a ranked candidate table, or a genomic region scan), you MUST always provide a clickable deep-link to the AlphaGenome Atlas for each variant.
--include_track_infoquerySPLICE_JUNCTIONSSPLICE_SITE_USAGESPLICE_SITESalphagenome-atlas-website-linksscripts/alphagenome_atlas_links.pylItemsf/atlas/track-predictions