Generalizable and Agent-Contextualized Metagenomic Viral Detection with Viromancer
Abstract
Metagenomic sequencing can reveal viruses in clinical and environmental samples, yet many reads remain short and unassembled, while reference-based classifiers are largely insensitive to unfamiliar sequences. We present Viromancer, an agentic pipeline for short-read viral discovery. Its core classifier, Lyra-Virus, is a lightweight state-space model that scores individual reads and trains in under two hours on consumer GPUs. Under strict family-level holdout, Lyra-Virus recognizes unseen viral families spanning six viral realms. It also detects Evo2-generated sequences without significant reference homology at rates far exceeding k-mer-based tools. Viromancer combines Lyra-Virus with established read- and contig-level methods, then uses LLM agents to review discordant and uncertain findings. We validated Viromancer on controlled viral spike-in datasets and deployed it on about 300 clinical respiratory metagenomes spanning a wide range of viral burdens. It recovered expected spike-ins and clinically reported infections, distinguished laboratory controls and database-labeling artifacts from plausible biological signals, and identified evidence of coinfections missed by clinicians. Viromancer makes the ambiguity of short-read viral detection visible, measurable, and manageable at scale, as tools find the signals, agents assemble the argument, and humans decide what the evidence means.