← Projects

Case Study · Published Research

Sequence-Based Virus Host Prediction

Carbajo Jr AL, Vensko TA, Pellett PE · Virus Evolution, 2026, 12(1), veag009 · doi.org/10.1093/ve/veag009

Can you tell whether a virus infects humans just by looking at its genome, no alignment, no annotation, no prior knowledge of what gene does what? That's the question behind this project: a curated dataset of 58,046 virus genomes and a neural network framework that reads raw nucleotide sequence and predicts human-host compatibility directly.

58,046 curated genomes across 15 virus families
0.820 best MCC, neural net at k = 5
97.2% accuracy of AI-assisted host labeling
2.61 Cohen's d separating human vs. animal coronaviruses

The problem: GenBank's metadata is a mess

Genomic signatures of host adaptation exist in virus sequences, but repositories like GenBank store the metadata needed to study them in wildly inconsistent formats. A host field might read "Homo sapiens," or "26-day-old piglet," or nothing at all, with the real information buried in an isolation-source note like "asymptomatic carrier." That inconsistency is exactly what has kept this kind of pan-virome analysis out of reach: you can't train a model on a label you can't trust.

Building a dataset worth training on

We started from 82,513 complete genomes across 15 virus families, chosen to span different genome architectures (dsDNA, ssRNA, dsRNA, reverse-transcribing) and a mix of strictly human, strictly non-human, and dual-host viruses. After filtering out partial, unverified, and non-standard sequences, we labeled every remaining genome for human-host compatibility using a three-tier system of increasing sophistication.

Tier 1 · String matching

Direct matches to standard scientific nomenclature, e.g. an explicit "Homo sapiens" host field.

Tier 2 · Pattern lookup

A curated regex dictionary normalizes informal terms, e.g. mapping "26-day-old piglet" to Sus scrofa.

Tier 3 · AI inference

Gemini 1.5 Flash reads clinical context, e.g. inferring Homo sapiens from "asymptomatic carrier" in a Hepatitis B record.

We manually checked 1,000 of Tier 3's AI-powered calls against GenBank records and the primary literature. It was right 97.2% of the time, and the misses clustered almost entirely around enteroviruses, where the host information genuinely isn't in the metadata, it's only findable by tracking down the associated paper.

The final set: 58,046 genomes, split almost evenly between human-associated (52.0%) and non-human-associated (48.0%) sequences. To keep the model honest, we didn't split train/validation/test randomly, near-duplicate strains would leak across the boundary. Instead we clustered 6-mer profiles with UMAP and DBSCAN and kept every sequence in a cluster on the same side of the split.

Teaching a model to read raw sequence

The input feature is deliberately simple: k-mer frequency, the normalized count of every possible substring of length k in a genome, for k = 3 through 8. No alignment, no gene annotation, no reference genome required, just how often each short nucleotide pattern shows up. We benchmarked this feature against three model families: logistic regression, random forest, and a small feed-forward neural network (two hidden layers, 64 and 32 units).

k-merLogistic regressionRandom forestNeural network
k30.7230.7590.810
k40.7750.7570.804
k50.7670.7410.820
k60.6540.7500.808
k70.6690.7460.779
k80.5940.7490.760

Matthews Correlation Coefficient by k-mer length and model architecture. The neural network wins at every k, peaking at k = 5.

Five-mers hit a sweet spot: long enough to capture host-specific motifs, short enough to avoid the sparsity that creeps in as the feature space grows exponentially (4k dimensions). Past k = 5, performance degrades across every model, worst of all for logistic regression, which suggests the extra length adds noise faster than signal once you're past short local motifs.

Does it generalize to viruses it's never seen?

A model that only memorizes training-set families isn't useful for anything new. So we ran a leave-one-family-out test: hold out an entire virus family, train on the rest, then predict human-host compatibility on the excluded family. The strongest result was Hepadnaviridae (MCC = 0.828 at k = 6), the family that includes Hepatitis B, while vector-borne and zoonotic families like Togaviridae and Rhabdoviridae stayed near zero across every k-mer length. That's not a failure of the model so much as a biological finding: those families' genomic composition looks like it's shaped more by their arthropod or wildlife reservoirs than by any consistent human-adaptation signature.

What is the model actually looking at?

Raw k-mer frequency vectors barely separate human from non-human genomes under t-SNE, but the network's learned 32-dimensional embeddings do, cleanly enough to form distinct islands per virus family. Overlaying predicted probability on that embedding space turned up something we didn't expect: viruses with weak predicted human-adaptation (rabies, Eastern equine encephalitis) have dramatically higher human fatality rates, while viruses with strong predicted adaptation (HPV, human cytomegalovirus) are nearly always mild. The zoonotic middle ground, monkeypox, dengue, West Nile, sits exactly where you'd expect: transitional probability, epidemic rather than purely fatal.

Unexpected finding

The model kept flagging human roseoloviruses (HHV-6A, HHV-6B, HHV-7) as non-human, despite them being common, mild human infections. Ablating individual k-mers traced the signal to fragments of the telomeric repeat TTAGGG, sequence roseoloviruses carry at their genome termini to integrate into host chromosome telomeres during latency. Almost no other human herpesvirus in the training set uses that persistence strategy, so the network had learned to associate telomeric motifs with non-human hosts. It wasn't wrong about the sequence pattern, it had just never seen this particular human trick before. Gallid alphaherpesvirus 2 (Marek's disease virus), which uses the same telomeric-integration strategy in chickens, clusters right next to the misclassified roseoloviruses in embedding space.

Real-world test: SARS-CoV-2

None of the training data included coronaviruses. As a real-world stress test, we scored 8,683 human SARS-CoV-2 genomes and 1,188 non-human betacoronavirus genomes with the trained classifier. Predicted human-adaptation probability separated the two groups cleanly (Mann-Whitney and Kolmogorov-Smirnov, both p < 1×10-300; Cohen's d = 2.61), even though the model had never seen a coronavirus during training. Gene-level ablation on paired genomes, bat coronavirus RaTG13 (2013), Wuhan-Hu-1 (2019), and a 2024 human isolate, showed the human-adaptive signal concentrating in ORF1ab, ORF3a, E, M, and N as the lineage spent more time circulating in humans.

We also tracked predicted human-adaptation probability across 8,683 SARS-CoV-2 genomes collected from December 2019 through January 2025, and found a small but statistically significant upward drift (p < 0.0001) consistent with the virus continuing to accumulate human-adaptive signal well after the initial outbreak. That trend deserves its own interactive chart, one is planned for this page.

Where this goes next

The binary human / non-human framing simplifies a messier biological reality, and repository sampling bias means clinically important viruses are overrepresented. The roseolovirus result is also a good reminder that k-mer frequency alone can conflate genuinely different biological strategies that happen to leave similar sequence signatures. Next steps: expanding taxonomic coverage, testing alternative sequence vectorizations, and building out community infrastructure so the dataset can grow past this first release.