Accelerating Metagenomics-Based Pathogen Surveillance with Agentic Algorithm Optimization

Metagenomic next-generation sequencing (mNGS) enables threat-agnostic detection of known, divergent, and novel pathogens, yet its widespread adoption for clinical and public health surveillance is constrained in part by the computational cost and latency of bioinformatic analysis. Accelerating the heavily hand-tuned tools at the core of mNGS analysis pipelines has traditionally required scarce low-level systems expertise. Here, we use large language models embedded in agentic harnesses to accelerate three cornerstone tools used for pathogen surveillance: DIAMOND for translated sequence alignment, Flye for de novo long-read assembly, and minimap2 for nucleotide alignment. Output-invariant optimizations reduced DIAMOND wall-clock runtime on short-read datasets by a mean of 60.2% in --fast mode with byte-identical outputs, and reduced mean Flye wall-clock runtime by 11.2% with assembly quality indistinguishable from baseline run-to-run variation. Combined with three optimizations discovered through evolutionary search, DIAMOND long-read mean runtime decreased by up to 62.7% relative to the original implementation in --fast mode, while preserving concordant top alignments for a mean of 99.4% of reads. Additionally, evolutionary search discovered an adaptive anchor-pruning heuristic for minimap2 that reduced mean wall-clock runtime on held-out PacBio HiFi and ONT R10.4.1 metagenomic datasets by 9.6-15.6% and 5.4-9.3%, respectively, while preserving the primary mapping location of confidently mapped reads (99.5-99.6% for HiFi; 98.5-99.3% for ONT across index chunk sizes). All proposed code changes have been merged into their upstream repositories, making these contributions available to existing surveillance pipelines. We release our prompts, configurations, and guidelines for contributors and maintainers, and call on the community to pursue an order-of-magnitude reduction in the computational burden of mNGS-based pathogen surveillance.

Authors

Institutions

Publication Details

Journal
bioRxiv (Cold Spring Harbor Laboratory)
Published
2026-12-03
DOI
https://doi.org/10.64898/2026.12.02.770816
Primary Topic
Genomics and Phylogenetic Studies
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Accelerating Metagenomics-Based Pathogen Surveillance with Agentic Algorithm Optimization

Lai Hong Wong, Pushmeet Kohli, Mikhail Kolmogorov, Pavel A. Pevzner et al.
bioRxiv (Cold Spring Harbor Laboratory)
Genomics and Phylogenetic Studies
preprint

Accelerating Metagenomics-Based Pathogen Surveillance with Agentic Algorithm Optimization

Lai Hong Wong, Pushmeet Kohli, Mikhail Kolmogorov, Pavel A. Pevzner, Peter Thielen, Benjamin Buchfink, Alexander I. Cowen-Rivers, Brian B. Merritt, Jeremy D. Ratcliff, Po-Sen Huang, Agata Laydon, Preston LJ Lim, Ngân Vũ, Stanley Ta, Jack Mason, Benjamin Reddy, Anna Koivuniemi
preprint en

Abstract

Metagenomic next-generation sequencing (mNGS) enables threat-agnostic detection of known, divergent, and novel pathogens, yet its widespread adoption for clinical and public health surveillance is constrained in part by the computational cost and latency of bioinformatic analysis. Accelerating the heavily hand-tuned tools at the core of mNGS analysis pipelines has traditionally required scarce low-level systems expertise. Here, we use large language models embedded in agentic harnesses to accelerate three cornerstone tools used for pathogen surveillance: DIAMOND for translated sequence alignment, Flye for de novo long-read assembly, and minimap2 for nucleotide alignment. Output-invariant optimizations reduced DIAMOND wall-clock runtime on short-read datasets by a mean of 60.2% in --fast mode with byte-identical outputs, and reduced mean Flye wall-clock runtime by 11.2% with assembly quality indistinguishable from baseline run-to-run variation. Combined with three optimizations discovered through evolutionary search, DIAMOND long-read mean runtime decreased by up to 62.7% relative to the original implementation in --fast mode, while preserving concordant top alignments for a mean of 99.4% of reads. Additionally, evolutionary search discovered an adaptive anchor-pruning heuristic for minimap2 that reduced mean wall-clock runtime on held-out PacBio HiFi and ONT R10.4.1 metagenomic datasets by 9.6-15.6% and 5.4-9.3%, respectively, while preserving the primary mapping location of confidently mapped reads (99.5-99.6% for HiFi; 98.5-99.3% for ONT across index chunk sizes). All proposed code changes have been merged into their upstream repositories, making these contributions available to existing surveillance pipelines. We release our prompts, configurations, and guidelines for contributors and maintainers, and call on the community to pursue an order-of-magnitude reduction in the computational burden of mNGS-based pathogen surveillance.

bioRxiv (Cold Spring Harbor Laboratory)
National Institutes of Health (US), Johns Hopkins University Applied Physics Laboratory (US), University of California San Diego (US), Google (United Kingdom) (GB), National Cancer Institute (US), Center for Cancer Research (US)
Genomics and Phylogenetic Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon