How variant scoring works

How variant scoring works#

AlphaGenome 2 scores a variant by predicting reference (REF) and alternate (ALT) profiles in one condition, restricting both to a spatial mask, and summarizing their difference per track (and per gene, junction, or CpG site where applicable).

Scoring pipeline#

Each variant scorer transforms paired REF and ALT predictions into scalar scores through four steps:

Variant scoring begins by running forward passes on the REF and ALT sequences across the requested genomic interval and output type (such as RNA_SEQ, ATAC, or SPLICE_SITES).

Predict REF and ALT profiles for a given output type.

Indel coordinate alignment

For insertions and deletions (indels), the ALT profile is aligned to REF genomic coordinates before comparison. Inserted bases are summarized by taking the maximum predicted signal across the inserted segment, while deleted bases are assigned zero signal in ALT so both profiles share identical positions.

A spatial mask restricts scoring to the positions relevant to the assay, discarding predictions outside the masked coordinates:

  • Variant-centered windows capture local cis-regulatory changes around the variant: 501 bp for ATAC, DNASE, CAGE, and CHIP_TF; 1201 bp for SC_ATAC and shared CpG sites in METHYLATION; 2001 bp for broad histone marks in CHIP_HISTONE; and 1 Mb for 3D interactions in CONTACT_MAPS.

  • Gene annotations from a GTF reference restrict scoring to exons (RNA_SEQ), gene bodies including introns (SPLICE_SITES, SPLICE_SITE_USAGE), top splice sites (SPLICE_JUNCTIONS), or 400-bp windows around 3’ cleavage sites (POLYADENYLATION).

Apply a variant-centered or gene-centered spatial mask.

Within the spatial mask, each scorer reduces positions along the sequence axis (mean, sum, or max), applies any optional log or \(\ell_2\) scaling, and compares ALT against REF to produce one scalar value per track (and per gene or CpG site when applicable).

Aggregate spatially across the mask and compute ALT minus REF.
How AggregationType names encode order of operations

Options in AggregationType list operations from right to left, with the rightmost operation applied first to the masked predictions:

  • DIFF_LOG2_SUM sums predicted coverage across the window first, transforms with \(\log_2(\text{sum} + 1)\), and then takes ALT minus REF.

  • DIFF_SUM_LOG2 transforms each position with \(\log_2(\text{value} + 1)\), sums across the mask, and then takes ALT minus REF.

Raw scoring outputs are returned as AnnData objects per variant and scorer. Calling tidy_scores() flattens them into a tidy table with raw_score, track metadata (including imputation_mode), optional strand matching (match_gene_strand), and optional filtering to protein-coding genes.

Select or aggregate scores across output tracks.

Next steps#

Scoring a variant

Run recommended scorers on single variants and batches, tidy outputs, and inspect top cell types and genes.

Scoring a variant
Analyzing a splicing variant

Compare splice site probabilities, splice site usage, and splice junction read counts on pathogenic variants.

Analyzing a splicing variant
Variant scorers API reference

Inspect all scorer classes, supported mask widths, and tidy_scores() options.

api/models_v2.html#variant-scorers