From 7c85a9becc177e8fcbf1344d7b13116efe66b180 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Tue, 25 Apr 2023 16:41:17 +0200 Subject: [PATCH 1/3] fix: update to newest fmindex_collection - This also changes the way that a search with an reversed index is working, so no reversing of the text is required anymore. - Requires to set the numbers of thread used for suffix array construction. --- src/mkindex_algo.hpp | 2 +- src/search_algo.hpp | 4 +--- submodules/fmindex-collection | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mkindex_algo.hpp b/src/mkindex_algo.hpp index 2737712e5..b7fb87ed3 100644 --- a/src/mkindex_algo.hpp +++ b/src/mkindex_algo.hpp @@ -603,7 +603,7 @@ auto generateIndex(TStringSet & seqs, LambdaIndexerOptions const & options) myPrint(options, 1, "Generating Index..."); double s = sysTime(); - TIndex index{seqs | bio::views::to_rank | fmindex_collection::add_sentinels, 5}; + TIndex index{seqs | bio::views::to_rank | fmindex_collection::add_sentinels, /*samplingRate*/5, /*threadNbr*/1}; double e = sysTime() - s; myPrint(options, 1, " done.\n"); diff --git a/src/search_algo.hpp b/src/search_algo.hpp index fad81a80f..1579e165a 100644 --- a/src/search_algo.hpp +++ b/src/search_algo.hpp @@ -470,11 +470,9 @@ inline void search_impl(LocalDataHolder & lH, TSeed && seed) { if constexpr (TGlobalHolder::c_dbIndexType == DbIndexType::FM_INDEX) { - //!TODO a reversed FMIndex is used, so the query need to be reversed, so we search from left to right - // This is a conceptual TODO for fmindex_collection library fmindex_collection::search_backtracking_with_buffers::search( lH.gH.indexFile.index, - seed | std::views::reverse | bio::views::to_rank | fmindex_collection::add_sentinel, + seed | bio::views::to_rank | fmindex_collection::add_sentinel, lH.searchOpts.maxSeedDist, lH.cursor_tmp_buffer, lH.cursor_tmp_buffer2, diff --git a/submodules/fmindex-collection b/submodules/fmindex-collection index 488a9979c..bb6123b65 160000 --- a/submodules/fmindex-collection +++ b/submodules/fmindex-collection @@ -1 +1 @@ -Subproject commit 488a9979cce4c3dc1c49e86e70ab78d2d871b3ba +Subproject commit bb6123b657d4b3612d0b864fae2884692a3ce08f From ed7a5a2158c470958a2e3d18ce1fc5bc34cb9357 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Wed, 26 Apr 2023 16:59:55 +0200 Subject: [PATCH 2/3] Update src/mkindex_algo.hpp Co-authored-by: Hannes Hauswedell --- src/mkindex_algo.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkindex_algo.hpp b/src/mkindex_algo.hpp index b7fb87ed3..49e17ca8c 100644 --- a/src/mkindex_algo.hpp +++ b/src/mkindex_algo.hpp @@ -603,7 +603,7 @@ auto generateIndex(TStringSet & seqs, LambdaIndexerOptions const & options) myPrint(options, 1, "Generating Index..."); double s = sysTime(); - TIndex index{seqs | bio::views::to_rank | fmindex_collection::add_sentinels, /*samplingRate*/5, /*threadNbr*/1}; + TIndex index{seqs | bio::views::to_rank | fmindex_collection::add_sentinels, /*samplingRate*/ 5, options.threads}; double e = sysTime() - s; myPrint(options, 1, " done.\n"); From 7b089760b05f2096b9cca419b0e047a1520a3704 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Wed, 3 May 2023 15:26:49 +0200 Subject: [PATCH 3/3] fix: update fmindex_collection submodule --- submodules/fmindex-collection | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/fmindex-collection b/submodules/fmindex-collection index bb6123b65..bbc0900f1 160000 --- a/submodules/fmindex-collection +++ b/submodules/fmindex-collection @@ -1 +1 @@ -Subproject commit bb6123b657d4b3612d0b864fae2884692a3ce08f +Subproject commit bbc0900f1c7fd41b946802689a2256f7fab711c7