The threshold q-gram distance: a simple, efficient, and effective distance measure for genomic sequence comparison

Abstract The q –gram distance between two strings $$s,s^\prime$$ , introduced by Ukkonen in 1992, is an alignment-free string similarity measure which can be computed in linear time, as opposed to the quadratic time necessary for alignment/edit distance. It is based on the $$L_1$$ -distance, or Manhattan-distance, between the multiplicity vectors of fixed-length substrings (so-called q-grams or k-mers ), and has been successfully applied in diverse bioinformatics settings. In this paper, we introduce the threshold q-gram distance (T q D), a new distance measure which is similar to the q -gram distance but uses reduced information on the multiplicities of the q -grams. The new measure retains the linear time computation of the q -gram distance but requires significantly less space. Storage space and accuracy of the measure can be controlled via a user-defined threshold t , which sets a limit on the maximum value of the integers in the multiplicity vectors. In particular, for $$t=1$$ , the comparison is made only on the basis of the sets of uniquely occurring q -grams on the one hand, and of repeated q -grams, on the other. We tested the new distance measure, using the benchmarking tool AFproject of Zielezinski et al. [Genome Biology, 2019], on several real-life data sets for phylogenetic reconstruction and compared the results with those of other k -mer based distance measures. Our experiments show that the new measure T q D compares well to other non-alignment based measures regarding accuracy, while requiring substantially less memory than the classic q -gram distance.

Authors

Institutions

Publication Details

Journal
Natural Computing
Published
2025-11-27
DOI
https://doi.org/10.1007/s11047-025-10054-5
Primary Topic
Algorithms and Data Compression
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The threshold q-gram distance: a simple, efficient, and effective distance measure for genomic sequence comparison

Zsuzsanna Lipták, Giuditta Franco, Alessio Milanese, Davide Cenzato
Natural Computing
Algorithms and Data Compression
article

The threshold q-gram distance: a simple, efficient, and effective distance measure for genomic sequence comparison

Zsuzsanna Lipták, Giuditta Franco, Alessio Milanese, Davide Cenzato
article en

Abstract

Abstract The q –gram distance between two strings $$s,s^\prime$$ , introduced by Ukkonen in 1992, is an alignment-free string similarity measure which can be computed in linear time, as opposed to the quadratic time necessary for alignment/edit distance. It is based on the $$L_1$$ -distance, or Manhattan-distance, between the multiplicity vectors of fixed-length substrings (so-called q-grams or k-mers ), and has been successfully applied in diverse bioinformatics settings. In this paper, we introduce the threshold q-gram distance (T q D), a new distance measure which is similar to the q -gram distance but uses reduced information on the multiplicities of the q -grams. The new measure retains the linear time computation of the q -gram distance but requires significantly less space. Storage space and accuracy of the measure can be controlled via a user-defined threshold t , which sets a limit on the maximum value of the integers in the multiplicity vectors. In particular, for $$t=1$$ , the comparison is made only on the basis of the sets of uniquely occurring q -grams on the one hand, and of repeated q -grams, on the other. We tested the new distance measure, using the benchmarking tool AFproject of Zielezinski et al. [Genome Biology, 2019], on several real-life data sets for phylogenetic reconstruction and compared the results with those of other k -mer based distance measures. Our experiments show that the new measure T q D compares well to other non-alignment based measures regarding accuracy, while requiring substantially less memory than the classic q -gram distance.

Natural ComputingVol. 24(4)
University of Verona (IT), SIB Swiss Institute of Bioinformatics (CH), Ca' Foscari University of Venice (IT), ETH Zurich (CH)
Openalex Percentile: Top 80%
Algorithms and Data Compression
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.

The threshold q-gram distance: a simple, efficient, and effective distance measure for genomic sequence comparison — Zsuzsanna Lipták, Giuditta Franco, et al. · Natural Computing (2025) | TGRS Research Map | TGRS