ResMiCo: increasing the quality of metagenome-assembled genomes with deep learning

Olga Mineeva, Daniel Danciu, Bernhard Schölkopf, Ruth E. Ley, Gunnar Rätsch, Nicholas D. Youngblut

Abstract

The number of published metagenome assemblies is rapidly growing due to advances in sequencing technologies. However, sequencing errors, variable coverage, repetitive genomic regions, and other factors can produce misassemblies, which are challenging to detect for taxonomically novel genomic data. Assembly errors can affect all downstream analyses. Accuracy for the state of the art in reference-free misassembly prediction does not exceed an AUPRC of 0.57. Here, we present the Residual neural network for Misassembled Contig identification (ResMiCo), a deep learning approach for reference-free identification of misassembled contigs. Trained on a dataset of unprecedented size and complexity, ResMiCo is substantially more accurate than existing tools and robust to novel taxonomic diversity. ResMiCo estimated 4.7% misassembled contigs per metagenome across multiple real-world datasets and can be used to optimize assembly hyperparameters for accuracy rather than just contiguity.

Introduction

Metagenomics allows researchers to sequence DNA directly from environmental samples, bypassing the need to culture individual microbes. However, reconstructing these short DNA reads into "contigs" is notoriously difficult. Challenges like sequencing errors, repetitive regions, and uneven coverage often lead to misassemblies—structural errors where DNA fragments are joined incorrectly.

Existing tools to detect these errors are often "reference-based," requiring a known genome for comparison, which is unavailable for most environmental microbes. Previous "reference-free" machine learning tools struggled to generalize to new species and different assembly methods. ResMiCo addresses these gaps by utilizing a deep learning architecture trained on massive, diverse synthetic data.

Methodology: The ResMiCo Pipeline

ResMiCo's core is a deep convolutional neural network with skip connections (a ResNet architecture). Instead of relying solely on DNA sequences, the model extracts 22 different features derived from how the original reads align back to the assembly, including mapping quality (MAPQ), alignment scores, and single-nucleotide variants (SNVs).

The ResMiCo workflow: from genome selection and read simulation to feature extraction and model training.

To handle the variable lengths of assembled contigs, the model employs a masking and global average pooling strategy. This allows it to process sequences of any length without losing spatial information. The researchers attributed previous performance ceilings to small, simplistic training sets. To overcome this, they generated the n9k-train dataset: 41.6 million contigs (123 billion bases) simulated from 9,000 reference genomes with varying error profiles.

Results and Generalization

ResMiCo achieved a significant leap in accuracy. On the n9k-novel test set—which contains genomes from taxonomic families entirely absent from the training data—ResMiCo reached an AUPRC of 0.76. This dwarfs the previous state-of-the-art (DeepMAsED), which scored only 0.25 on the same data. In real-world applications, filtering assemblies with ResMiCo reduced true error rates from 4% to 1%.

Understanding Model Decisions

Explainability is a key feature of ResMiCo. Using SHAP (Shapley Additive Explanations), the authors ranked the importance of the 22 input features to understand what drives the model's predictions.

SHAP values ranking the importance of different alignment features in predicting misassemblies.

The analysis showed that mapping quality (mapq mean) and alignment scores (al_score mean and stdev) are the strongest predictors of errors. This confirms that the model is learning biologically and technically relevant signatures of assembly failure rather than just memorizing specific species.

Conclusion and Future Work

ResMiCo provides a robust way to clean up "dark matter" genomic data. Beyond quality control, it can be used as an "oracle" to optimize assembly parameters, prioritizing accuracy over mere contiguity. Future iterations may aim to pinpoint exact breakpoints and classify specific error types (e.g., inversions vs. translocations) to enable automated assembly correction. Current limitations include sensitivity to read insert size distributions and the computational cost of the initial read-mapping and feature extraction steps.

Summary updated

BibTeX
@article{mineeva2023resmico,
  author = {Olga Mineeva and Daniel Danciu and Bernhard Schölkopf and Ruth E. Ley and Gunnar Rätsch and Nicholas D. Youngblut},
  title = {{ResMiCo: increasing the quality of metagenome-assembled genomes with deep learning}},
  journal = {PLOS Computational Biology},
  year = {2023},
  doi = {10.1371/journal.pcbi.1011001},
}
Figure