Sign in
BioinformaticsbioRxiv
Preprint

Medlib: A Feature-Rich C/C++ Library for Exact Alignment of Nanopore Sequences Using Multiple Edit Distance

Mehdi RafeieiD, Fatemeh VafaeeiD, Omid R. FaridaniiD

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.

PDFDOICode

02 /Specification & Classification

Click any tag to browse matching papers

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.

Similarity Map
SelectedSame fieldCross-field
THISDoblas '25Sosic '17Joshi '20Yahi '18Li '18Liu '26
72% semantic matchBioinformatics
Max Doblas, Oscar Lostes-Cazorla, Quim Aguado-Puig+3 more·Bioinformatics·Mar 1, 2025· 8 citations