Medlib: A Feature-Rich C/C++ Library for Exact Alignment of Nanopore Sequences Using Multiple Edit Distance
Abstract
Pairwise sequence alignment is a cornerstone of bioinformatics, driving applications from variant calling to barcode demultiplexing. However, the advent of long-read, high-error sequencing platforms--such as Oxford Nanopore Technologies--demands alignment tools that not only deliver exact results but also accommodate the elevated noise inherent in these data. Here, we introduce Medlib (Multiple Edit Distance Library) that offers both high performance and novel, biologically motivated features. Medlibs threshold mode allows users to retrieve every alignment with edit distance k [≤] kth and optionally alignment score s [≥] sth, ensuring comprehensive discovery of all plausible matches. Counterintuitively, this exhaustive retrieval outpaces traditional minimum-error searches. Medlib further provides the first exact implementations of overlap-aware reporting and motif boundary treatment. Medlib supports multiple input formats, predefined and custom alphabets, affine-gap scoring applied retrospectively, built-in dedicated multithreading schemes, and user-defined function callbacks for immediate post-processing. Benchmarking against Edlib demonstrates a 1.6x speedup in minimum mode and even greater gains (2.5x) in threshold mode--while delivering up to twice as many alignments. Medlib thus offers a robust, feature-rich engine for exact pairwise alignment in modern, high-throughput sequencing workflows. Availability and ImplementationSource code, installation instructions and test data are freely available for download at https://github.com/Mehdi-Rafeie/Medlib, under the MIT license.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 1
- Assay
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- QuickEd: High-performance exact sequence alignment based on bound-and-align
Max Doblas, Oscar Lostes-Cazorla, … Santiago Marco‐Sola·BioinformaticsPeer-reviewed·Mar 1, 2025
- Edlib: A C/C++ library for fast, exact sequence alignment using edit distance
Martin Sosic, Mile Sikic·BioinformaticsPeer-reviewed·Jan 31, 2017
- QAlign: Aligning nanopore reads accurately using current-level modeling
Dhaivat Joshi, Shunfu Mao, … Suhas N. Diggavi·BioinformaticsPeer-reviewed·Sep 29, 2020
- RecNW: A fast pairwise aligner for targeted sequencing
Alexandre Yahi, Tuuli Lappalainen, … Nicholas P. Tatonetti·bioRxiv·Jul 19, 2018
- Minimap2: pairwise alignment for nucleotide sequences
Heng Li·BioinformaticsPeer-reviewed·May 4, 2018
- Minipoa: A minimizer-based method for fast and memory-efficient partial order alignment
Haodong Liu, Pinglu Zhang, … Mengting Niu·Genome ResearchPeer-reviewed·Sep 1, 2026