From dc272d5645385b57229acf97b4820a44ec77b8d1 Mon Sep 17 00:00:00 2001 From: Woosub-Kim Date: Tue, 13 Feb 2024 14:44:01 +0900 Subject: [PATCH] complexsearch with DBSCAN commit for benchmark --- src/strucclustutils/createcomplexreport.h | 2 +- src/strucclustutils/scorecomplex.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strucclustutils/createcomplexreport.h b/src/strucclustutils/createcomplexreport.h index a5274dbb..faa96a29 100644 --- a/src/strucclustutils/createcomplexreport.h +++ b/src/strucclustutils/createcomplexreport.h @@ -16,7 +16,7 @@ const float DEF_BIT_SCORE = -1.0; const int UNINITIALIZED = 0; const float LEARNING_RATE = 0.1; const float DEFAULT_EPS = 0.1; -const unsigned int MULTIPLE_CHAIN = 2; +const unsigned int MULTIPLE_CHAINED_COMPOLEX = 2; typedef std::pair compNameChainName_t; typedef std::map chainKeyToComplexId_t; typedef std::map> complexIdToChainKeys_t; diff --git a/src/strucclustutils/scorecomplex.cpp b/src/strucclustutils/scorecomplex.cpp index 45c18c94..2a649141 100644 --- a/src/strucclustutils/scorecomplex.cpp +++ b/src/strucclustutils/scorecomplex.cpp @@ -482,7 +482,7 @@ class DBSCANCluster { } if (checkChainRedundancy()) { neighbors.clear(); - if (searchResult.alnVec.size() < MULTIPLE_CHAIN) + if (searchResult.alnVec.size() < MULTIPLE_CHAINED_COMPOLEX) finishDBSCAN(); return runDBSCAN(); @@ -649,7 +649,7 @@ class ComplexScorer { currAlns.clear(); paredSearchResult.filterAlnVec(minAssignedChainsRatio); paredSearchResult.standardize(); - if (!paredSearchResult.alnVec.empty()) // && currDbChainKeys.size() > 1 + if (!paredSearchResult.alnVec.empty() && currDbChainKeys.size() >= MULTIPLE_CHAINED_COMPOLEX) searchResults.emplace_back(paredSearchResult); paredSearchResult.alnVec.clear(); @@ -833,7 +833,7 @@ int scorecomplex(int argc, const char **argv, const Command &command) { for (size_t qCompIdx = 0; qCompIdx < qComplexIndices.size(); qCompIdx++) { unsigned int qComplexId = qComplexIndices[qCompIdx]; std::vector &qChainKeys = qComplexIdToChainKeysMap.at(qComplexId); - if (qChainKeys.size() < MULTIPLE_CHAIN) + if (qChainKeys.size() < MULTIPLE_CHAINED_COMPOLEX) continue; complexScorer.getSearchResults(qComplexId, qChainKeys, dbChainKeyToComplexIdMap, dbComplexIdToChainKeysMap, searchResults); // for each db complex