From 0898eb901272f318bd099a4b7e56d221bbb050cc Mon Sep 17 00:00:00 2001 From: Milot Mirdita Date: Mon, 13 Jan 2025 20:49:56 +0900 Subject: [PATCH] Set split 1 at the start of Pref Index Reader so it writes correct meta --- src/prefiltering/PrefilteringIndexReader.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/prefiltering/PrefilteringIndexReader.cpp b/src/prefiltering/PrefilteringIndexReader.cpp index 19b4bf80..dc0e4406 100644 --- a/src/prefiltering/PrefilteringIndexReader.cpp +++ b/src/prefiltering/PrefilteringIndexReader.cpp @@ -58,6 +58,10 @@ void PrefilteringIndexReader::createIndexFile(const std::string &outDB, bool compBiasCorrection, int alphabetSize, int kmerSize, int maskMode, int maskLowerCase, float maskProb, int maskNrepeats, int kmerThr, int targetSearchMode, int splits, int indexSubset) { + const bool noKmerIndex = (indexSubset & Parameters::INDEX_SUBSET_NO_PREFILTER) != 0; + if (noKmerIndex) { + splits = 1; + } const int SPLIT_META = splits > 1 ? 0 : 0; const int SPLIT_SEQS = splits > 1 ? 1 : 0; @@ -190,11 +194,6 @@ void PrefilteringIndexReader::createIndexFile(const std::string &outDB, (Parameters::isEqualDbtype(seqType, Parameters::DBTYPE_NUCLEOTIDES) || Parameters::isEqualDbtype(seqType, Parameters::DBTYPE_AMINO_ACIDS)) ? alphabetSize -1: alphabetSize; - const bool noKmerIndex = (indexSubset & Parameters::INDEX_SUBSET_NO_PREFILTER) != 0; - if (noKmerIndex) { - splits = 1; - } - ScoreMatrix s3; ScoreMatrix s2; if (Parameters::isEqualDbtype(seqType, Parameters::DBTYPE_HMM_PROFILE) == false && noKmerIndex == false) {