FM-indexes are a crucial data structure in DNA alignment, for example, but searching with them usually takes at least one random access per character in the query pattern. Ferragina and Fischer observed in 2007 that word-based indexes often use fewer random accesses than character-based indexes, and thus support faster searches. Since DNA lacks natural word-boundaries, however, it is necessary to parse it somehow before applying word-based FM-indexing. Last year, Deng et al.\ proposed parsing genomic data by induced suffix sorting, and showed the resulting word-based FM-indexes support faster counting queries than standard FM-indexes when patterns are a few thousand characters or longer. In this paper we show that using prefix-free parsing -- which takes parameters that let us tune the average length of the phrases -- instead of induced suffix sorting, gives a significant speedup for patterns of only a few hundred characters. We implement our method and demonstrate it is between 3 and 18 times faster than competing methods on queries to GRCh38. And was consistently faster on queries made to 25,000, 50,000 and 100,000 SARS-CoV-2 genomes. Hence, it is very clear that our method accelerates the performance of count over all state-of-the-art methods with a minor increase in the memory. Our source code is available at https://github.com/marco-oliva/afm .
翻译:FM-index是DNA比对中的关键数据结构,但使用该索引进行搜索时,每个查询模式字符通常至少需要一次随机访问。Ferragina与Fischer在2007年指出,基于词的索引相比基于字符的索引所需的随机访问次数更少,因此支持更快的搜索。然而,由于DNA缺乏天然的词边界,在应用基于词的FM-index之前必须对其解析。去年,Deng等人提出通过诱导后缀排序解析基因组数据,并证明当查询模式长度达数千字符或更长时,由此生成的基于词的FM-index支持比标准FM-index更快的计数查询。本文证明:采用可通过参数调节短语平均长度的前缀无关解析替代诱导后缀排序,可在仅数百字符的模式查询中实现显著加速。我们实现了该方法,并在对GRCh38的查询中验证其速度较竞争方法快3至18倍。在对25,000、50,000及100,000个SARS-CoV-2基因组的查询中,该方法始终表现得更快。因此,我们的方法在内存小幅增加的前提下,显著提升了所有现有方法的计数性能。源代码见https://github.com/marco-oliva/afm 。