Skip to content

Commit

Permalink
complexsearch initial search parameter adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
Woosub-Kim committed Jan 5, 2024
1 parent 49dabe0 commit 2a18734
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
15 changes: 3 additions & 12 deletions src/strucclustutils/scorecomplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ class DBSCANCluster {

unsigned int finishDBSCAN() {
initializeAlnLabels();
if (prevMaxClusterSize < minClusterSize || bestClusters.empty()) return UNCLUSTERED;
if (prevMaxClusterSize < minClusterSize || bestClusters.empty())
return UNCLUSTERED;
cLabel = CLUSTERED;
for (auto &cluster: bestClusters) {
for (auto alnIdx: cluster) {
Expand All @@ -440,22 +441,12 @@ class DBSCANCluster {
for (size_t alnIdx=0; alnIdx<searchResult.alnVec.size(); alnIdx++) {
neighbors.emplace_back(alnIdx);
}
if (checkChainRedundancy())
if (bestClusters.empty() || checkChainRedundancy())
return UNCLUSTERED;
prevMaxClusterSize = neighbors.size();
bestClusters.emplace_back(neighbors);
return finishDBSCAN();
}

// void free() {
// neighbors.clear();
// neighborsOfCurrNeighbor.clear();
// qFoundChainKeys.clear();
// dbFoundChainKeys.clear();
// distMap.clear();
// currClusters.clear();
// bestClusters.clear();
// }
};

class ComplexScorer {
Expand Down
15 changes: 10 additions & 5 deletions src/workflow/ComplexSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ int complexsearch(int argc, const char **argv, const Command &command) {
par.greedyBestHits) {
needBacktrace = true;
}
if (needBacktrace) {
Debug(Debug::INFO) << "Alignment backtraces will be computed, since they were requested by output format.\n";
par.addBacktrace = true;
par.PARAM_ADD_BACKTRACE.wasSet = true;
}
// if (needBacktrace) {
// Debug(Debug::INFO) << "Alignment backtraces will be computed, since they were requested by output format.\n";
// par.addBacktrace = true;
// par.PARAM_ADD_BACKTRACE.wasSet = true;
// }
if (needLookup) {
par.writeLookup = true;
}
Expand Down Expand Up @@ -101,6 +101,11 @@ int complexsearch(int argc, const char **argv, const Command &command) {
cmd.addVariable("QUERYDB", par.filenames.back().c_str());
cmd.addVariable("LEAVE_INPUT", par.dbOut ? "TRUE" : NULL);
par.filenames.pop_back();

// initial search speed up!
par.addBacktrace = par.exhaustiveSearch;
par.alignmentType = par.exhaustiveSearch ? par.alignmentType : LocalParameters::ALIGNMENT_TYPE_3DI_AA;

cmd.addVariable("SEARCH_PAR", par.createParameterString(par.structuresearchworkflow, true).c_str());
cmd.addVariable("SCORECOMPLEX_PAR", par.createParameterString(par.scorecomplex).c_str());
cmd.addVariable("THREADS_PAR", par.createParameterString(par.onlythreads).c_str());
Expand Down

0 comments on commit 2a18734

Please sign in to comment.