Skip to content

Commit

Permalink
Merge commit '675b96235874316898cd8aef14038ececed1a230'
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed May 8, 2023
2 parents ea587d0 + 675b962 commit b46262c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/mmseqs/src/commons/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ Parameters::Parameters():
ungappedprefilter.push_back(&PARAM_THREADS);
ungappedprefilter.push_back(&PARAM_COMPRESSED);
ungappedprefilter.push_back(&PARAM_V);
ungappedprefilter.push_back(&PARAM_TAXON_LIST);
// clustering
clust.push_back(&PARAM_CLUSTER_MODE);
Expand Down
17 changes: 16 additions & 1 deletion lib/mmseqs/src/prefiltering/ungappedprefilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "FastSort.h"
#include "SubstitutionMatrixProfileStates.h"
#include "IndexReader.h"

#include "QueryMatcherTaxonomyHook.h"
#ifdef OPENMP
#include <omp.h>
#endif
Expand Down Expand Up @@ -77,6 +77,11 @@ int ungappedprefilter(int argc, const char **argv, const Command &command) {
}


QueryMatcherTaxonomyHook * taxonomyHook = NULL;
if(par.PARAM_TAXON_LIST.wasSet){
taxonomyHook = new QueryMatcherTaxonomyHook(par.db2, tdbr, par.taxonList);
}

Debug::Progress progress(qdbr->getSize());
std::vector<hit_t> shortResults;
shortResults.reserve(tdbr->getSize()/2);
Expand Down Expand Up @@ -115,6 +120,13 @@ int ungappedprefilter(int argc, const char **argv, const Command &command) {
#pragma omp for schedule(static) nowait
for (size_t tId = 0; tId < tdbr->getSize(); tId++) {
unsigned int targetKey = tdbr->getDbKey(tId);
if(taxonomyHook != NULL){
TaxID currTax = taxonomyHook->taxonomyMapping->lookup(targetKey);
if (taxonomyHook->expression->isAncestor(currTax)) {
continue;
}
}

const bool isIdentity = (queryKey == targetKey && (par.includeIdentity || sameDB))? true : false;
if(sequenceLookup == NULL){
char * targetSeq = tdbr->getData(tId, thread_idx);
Expand Down Expand Up @@ -171,6 +183,9 @@ int ungappedprefilter(int argc, const char **argv, const Command &command) {
}


if(taxonomyHook != NULL){
delete taxonomyHook;
}

if(sameDB == false){
delete qDbrIdx;
Expand Down

0 comments on commit b46262c

Please sign in to comment.