omnimissense

Score missense variants in any species with protein language models, straight from a VCF.
pip install omnimissense # or: uv tool install omnimissense
omnimissense doctor # checks bcftools (bundled), PyTorch, CUDA
omnimissense annotate --vcf my.vcf.gz --fasta genome.fa.gz --gff3 genes.gff3.gz -o my.oms.vcf.gz
Python ≥ 3.11; a CUDA GPU is strongly recommended (CPU works but is slow). bcftools is bundled
through pysam: nothing else to install. Full example: Quick start.
Status: alpha. The pipeline works end to end on Ensembl and NCBI annotations (dog, yeast,
E. coli: proteomes identical to the reference translations), reproduces published ESM-2
results and separates known dog disease variants from common dog variants (see
Validation).
The scores measure how disruptive a substitution looks to the protein, not whether it
causes disease: do not use them alone for breeding or clinical decisions.
Why
For human variants, precomputed missense effect scores are everywhere (AlphaMissense,
ESM1b from Brandes et al. 2023, VESM, …). For other species there is almost nothing:
the usual workaround is to lift variants over to the human genome and borrow human scores,
which drops variants that have no alignable human counterpart and scores the wrong protein.
omnimissense scores each variant on the species' own protein, using only files that
exist for any sequenced genome:
| Input |
What it is |
| VCF |
the variants (differences from the reference genome) |
| FASTA |
the reference genome sequence |
| GFF3 |
the gene annotation (where genes, exons and coding sequences are): Ensembl, NCBI RefSeq, Prokka or Bakta layout |
It outputs the same VCF (all records, all samples) with protein-language-model scores in the
INFO field, plus a TSV with one row per missense consequence. It can also write the scores
of every possible missense SNV of a genome, so that VCFs can later be annotated with bcftools
alone (Annotating without a GPU).
How it works
- REF check. Every VCF record's REF allele is compared with the genome. Mismatching
records are flagged (
OMS_REF_MISMATCH) and skipped; if more than 10% mismatch, the run
stops (VCF and FASTA are probably from different assemblies).
- Consequences are called with
bcftools csq
(bundled in pysam, nothing to install), one record at a time, for every ALT allele, with
the genetic code of each sequence (one csq run per code, see
Genetic codes).
- Proteins are translated from the FASTA + GFF3, using the transcripts exactly as csq
parsed them (
--dump-gff), so both steps always agree on transcripts and coding segments.
The reference amino acid reported by csq must match the translated protein; mismatches are
reported (ref_aa_mismatch).
- Scores come from a protein language model, by default VESM 650M (an ESM-2 650M
re-trained for variant effects, MIT license; fp16 on GPU), as log-likelihood ratios
log P(alt) − log P(ref) at the mutated position (more negative = more likely damaging):
wt_marginal (default): one forward pass per protein gives all 19 substitutions at
every position; the whole proteome can be precomputed once (omnimissense precompute),
after which annotating a VCF takes seconds.
masked_marginal (--masked): the position is masked and predicted from its context;
one forward pass per position, computed only for the variants in the VCF. Usually the
better mode for plain ESM-2, not for VESM (see Validation).
- Proteins longer than 1022 residues are split into 1022-residue windows overlapping by
511; each residue's scores are a weighted average over the windows that contain it, with
weights fading near artificial window edges (scheme of Brandes et al. 2023).
- Cache. Scores are stored on disk (Parquet) keyed by the SHA-256 of the protein
sequence, so identical isoforms and repeated runs are never recomputed.
Quick start: dog
The dog reference used by Ensembl (release 116, checked 2026-11-25) is ROS_Cfam_1.0
(GenBank GCA_014441545.1, genebuild 2020-10).
mkdir -p data/dog && cd data/dog
B=https://ftp.ensembl.org/pub/release-116
curl -O $B/fasta/canis_lupus_familiaris/dna/Canis_lupus_familiaris.ROS_Cfam_1.0.dna.toplevel.fa.gz
curl -O $B/gff3/canis_lupus_familiaris/Canis_lupus_familiaris.ROS_Cfam_1.0.116.gff3.gz
cd ../..
FASTA=data/dog/Canis_lupus_familiaris.ROS_Cfam_1.0.dna.toplevel.fa.gz
GFF3=data/dog/Canis_lupus_familiaris.ROS_Cfam_1.0.116.gff3.gz
# optional, once: score the whole proteome into the cache (default model: VESM 650M)
omnimissense precompute --fasta $FASTA --gff3 $GFF3
omnimissense annotate --vcf my_dogs.vcf.gz --fasta $FASTA --gff3 $GFF3 \
-o my_dogs.omnimissense.vcf.gz # also writes my_dogs.omnimissense.tsv
# optional: all scores of all coding transcripts in one Parquet file
omnimissense export --fasta $FASTA --gff3 $GFF3 -o dog_scores.parquet
# optional: every possible missense SNV at genome coordinates (no GPU needed afterwards)
omnimissense export-variants --fasta $FASTA --gff3 $GFF3 -o dog_snvs.vcf.gz
The plain-gzip FASTA distributed by Ensembl is recompressed once to BGZF (.fa.bgz) next to
the original, because random access needs it. From a development clone, prefix the commands
with uv run.
Annotating without a GPU
export-variants writes every possible missense SNV of the canonical coding transcripts
(--all-transcripts: all of them) with its score, at genome coordinates, tabix-indexed:
.vcf.gz: one record per SNV with the same OMS / OMS_WT tags as annotate;
.tsv.gz: one row per SNV and transcript (#CHROM POS REF ALT gene transcript canonical protein_variant oms_wt), for R, pandas or bcftools annotate -c.
Any VCF can then be annotated with bcftools alone, in seconds. Split multi-allelic records
first (bcftools annotate matches one annotation record per VCF record, so without the split
only one ALT of a multi-allelic record gets its score), and index the result (bcftools annotate with a VCF annotation file needs an indexed input):
bcftools norm -m -any -Oz -o my_dogs.split.vcf.gz my_dogs.vcf.gz
bcftools index -t my_dogs.split.vcf.gz
bcftools annotate -a dog_snvs.vcf.gz -c INFO/OMS,INFO/OMS_WT -Oz -o my_dogs.oms.vcf.gz my_dogs.split.vcf.gz
The result is identical to omnimissense annotate for SNVs (checked on every SNV of 300
random genes in yeast and in E. coli; see Validation). annotate is still needed for
masked marginals and for what the file does not hold: MNVs, and transcripts that are not
exported. Changes of a start codon (start lost) or to a stop codon are not missense and are
not in the file. Sizes: dog (canonical transcripts) 73.8 M SNVs; E. coli 8.6 M SNVs,
96 MB (VCF) in 49 s; yeast (all transcripts) 19.3 M SNVs, 216 MB (VCF) or 153 MB (TSV) in
1–2 min, from cached scores.
Other species
Any assembly with an Ensembl or NCBI RefSeq annotation works the same way, prokaryotes
included (Prokka and Bakta GFF3 too). From NCBI, take <assembly>_genomic.fna.gz and <assembly>_genomic.gff.gz from the
assembly's FTP folder (e.g. genomes/all/GCF/000/146/045/GCF_000146045.2_R64/ for yeast);
transcript IDs are then NCBI's (rna-NM_…, rna-XM_…). The VCF must use the same sequence
names as the FASTA (NCBI: accessions such as NC_001133.9).
Genetic codes
Proteins are translated, and consequences called, with the
NCBI genetic code of each
sequence (the 26 tables bcftools csq has: 1–6, 9–16, 21–31, 33):
| Sequences |
Code used |
| nuclear (and other non-mitochondrial) |
--genetic-code, else the GFF3's transl_table, else 1 (standard) |
mitochondrial (MT, chrM, … or NCBI genome=mitochondrion) |
--mito-genetic-code, else the GFF3's transl_table, else skipped |
NCBI writes transl_table on the CDS features whenever the code is not the standard one, so
NCBI annotations need no option (e.g. yeast mitochondria: table 3; bacteria and plastids: 11;
Candida: 12). Ensembl GFF3 files carry no code: pass e.g. --mito-genetic-code 2 for
vertebrate mitochondria (3 yeast, 5 invertebrates) or --genetic-code 6 for ciliates.
Precomputed scores
Produced with omnimissense precompute + omnimissense export; the dataset card documents the
schema, provenance and limitations.
Output
VCF INFO fields
| Field |
Number |
Content |
OMS |
. |
one entry per missense consequence: Allele\|Gene\|Transcript\|Canonical\|ProteinPos\|RefAA\|AltAA\|WTMarginal\|MaskedMarginal\|Status |
OMS_WT |
A |
lowest (most damaging) wild-type-marginal score across transcripts, per ALT allele |
OMS_MM |
A |
lowest masked-marginal score across transcripts, per ALT allele (only with --masked) |
OMS_REF_MISMATCH |
flag |
the REF allele does not match the genome; record not annotated |
BCSQ |
. |
consequences from bcftools csq (all consequence types) |
TSV columns: chrom pos ref alt gene transcript canonical biotype strand protein_pos ref_aa alt_aa protein_length n_windows wt_marginal masked_marginal status
Status values: ok, ref_aa_mismatch (csq and the translated protein disagree),
multi_aa_change (several residues change), nonstandard_aa, protein_unavailable
(e.g. internal stop codon), mitochondrial_skipped (see limitations), pseudogene (CDS
flagged pseudo=true by NCBI: a disrupted gene). Only ok rows are scored.
Performance (RTX 3070, 8 GB)
| Step |
Measured |
| Wild-type marginals, 650M model fp16 (ESM-2 and VESM have the same size) |
~12,400 residues/s, 1.6 GiB peak VRAM |
Whole dog proteome (precompute, ESM-2) |
43,092 unique proteins, 26.7 M residues in 36 min; cache 1.4 GB |
Masked marginals (--masked) |
15–28 positions/s, depending on protein length |
| Annotate 127,270 dog variants (chr38, 0–5 Mb; 1,689 missense consequences), default settings |
25 s on first run, 12 s when the proteins are cached (1.2 GB RAM) |
Same, with --masked (ESM-2) |
137 s on first run, 13 s when cached |
| Proteome translation |
~10 s (after the one-off BGZF conversion of the genome, ~3 min) |
export-variants, from cached scores (4 CPU cores, no GPU) |
E. coli 8.6 M SNVs in 49 s; yeast 19.3 M SNVs in 1–2 min |
| ProteinGym, all 217 assays, wild-type marginals |
~15 s of GPU per model |
The dog annotation and translation times were measured with version 0.2.0. Since 0.3.0 the
GFF3 is also parsed by csq and scanned once more (prokaryotic layout, genetic codes); these
times have not been re-measured.
Validation
Scripts and details: benchmarks/README.md. Results, one file per
model: benchmarks/results/. Two models are benchmarked: ESM-2 650M and VESM 650M
(an ESM-2 re-trained for variant effects; scored with the wild-type marginal, as its authors
do).
Implementation checks