We study the problem of finding maximal exact matches (MEMs) between a query string $Q$ and a labeled graph $G$. MEMs are an important class of seeds, often used in seed-chain-extend type of practical alignment methods because of their strong connections to classical metrics. A principled way to speed up chaining is to limit the number of MEMs by considering only MEMs of length at least $\kappa$ ($\kappa$-MEMs). However, on arbitrary input graphs, the problem of finding MEMs cannot be solved in truly sub-quadratic time under SETH (Equi et al., ICALP 2019) even on acyclic graphs. In this paper we show an $O(n\cdot L \cdot d^{L-1} + m + M_{\kappa,L})$-time algorithm finding all $\kappa$-MEMs between $Q$ and $G$ spanning exactly $L$ nodes in $G$, where $n$ is the total length of node labels, $d$ is the maximum degree of a node in $G$, $m = |Q|$, and $M_{\kappa,L}$ is the number of output MEMs. We use this algorithm to develop a $\kappa$-MEM finding solution on indexable Elastic Founder Graphs (Equi et al., Algorithmica 2022) running in time $O(nH^2 + m + M_\kappa)$, where $H$ is the maximum number of nodes in a block, and $M_\kappa$ is the total number of $\kappa$-MEMs. Our results generalize to the analysis of multiple query strings (MEMs between $G$ and any of the strings). Additionally, we provide some preliminary experimental results showing that the number of graph MEMs is orders of magnitude smaller than the number of string MEMs of the corresponding concatenated collection.
翻译:我们研究了在查询字符串 $Q$ 和带标签图 $G$ 之间寻找最大精确匹配(MEMs)的问题。MEMs是一类重要的种子,因其与经典度量的紧密联系,常被用于种子-链-扩展类型的实用比对方法中。加速链式匹配的一种规范方法是仅考虑长度至少为 $\kappa$ 的MEMs($\kappa$-MEMs)以限制其数量。然而,在任意输入图上,即使在无环图上,根据SETH假设(Equi等人,ICALP 2019),寻找MEMs的问题也无法在真正次二次时间内解决。本文提出了一种时间复杂度为 $O(n\cdot L \cdot d^{L-1} + m + M_{\kappa,L})$ 的算法,可找出 $Q$ 与 $G$ 之间恰好跨越 $G$ 中 $L$ 个节点的所有 $\kappa$-MEMs,其中 $n$ 为节点标签总长度,$d$ 为 $G$ 中节点的最大度数,$m = |Q|$,$M_{\kappa,L}$ 为输出MEMs的数量。利用该算法,我们针对可索引弹性创始人图(Equi等人,Algorithmica 2022)开发了一种 $\kappa$-MEM 寻找方案,其运行时间为 $O(nH^2 + m + M_\kappa)$,其中 $H$ 为一个块中的最大节点数,$M_\kappa$ 为 $\kappa$-MEMs的总数。我们的结果可推广至多个查询字符串的分析(即 $G$ 与任意字符串之间的MEMs)。此外,我们提供了初步实验结果表明,图MEMs的数量比相应串联集合的字符串MEMs数量低数个数量级。