Skip to content

Commit

Permalink
Cleanup merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
RuoshiZhang committed Sep 3, 2019
1 parent b984c95 commit 74279ab
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ BacteriaBench/
EliTestFiles/
NCBI_Bacteria_Orfs/
build.old/
.vscode/c_cpp_properties.json
.vscode/
vsc.code-workspace
50 changes: 0 additions & 50 deletions .vscode/launch.json

This file was deleted.

86 changes: 0 additions & 86 deletions .vscode/settings.json

This file was deleted.

5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,3 @@ To search with multiple servers, call the `search` or `cluster` workflow with th

RUNNER="mpirun -pernode -np 42" mmseqs search queryDB targetDB resultDB tmp


<<<<<<< HEAD
RUNNER="mpirun -pernode -np 42" mmseqs search queryDB targetDB resultDB tmp
=======
>>>>>>> e601ea0c213fb12391b70751220e361c96eb98ea
2 changes: 1 addition & 1 deletion src/commons/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Parameters::Parameters():
PARAM_SIMPLE_BEST_HIT(PARAM_SIMPLE_BEST_HIT_ID, "--simple-best-hit", "Use simple best hit", "Update the p-value by a single best hit, or by best and second best hits", typeid(bool), (void*) &simpleBestHit, ""),
PARAM_ALPHA(PARAM_ALPHA_ID, "--alpha", "Alpha", "Set alpha for combining p-values during aggregation", typeid(float), (void*) &alpha, ""),
PARAM_SHORT_OUTPUT(PARAM_SHORT_OUTPUT_ID, "--short-output", "Short output", "The output database will contain only the spread p-value", typeid(bool), (void*) &shortOutput, ""),
PARAM_AGGREGATION_MODE(PARAM_AGGREGATION_MODE_ID, "--aggregation-mode", "Aggregation mode", "Combined P-values computed from 0: multi-hit, 1:minimum of all P-values, 2: product-of-P-values, 3: truncated product", typeid(int), (void*) &aggregationMode, "^[0-4]{1}$"),
PARAM_AGGREGATION_MODE(PARAM_AGGREGATION_MODE_ID, "--aggregation-mode", "Aggregation mode", "Combined P-values computed from 0: multi-hit, 1: minimum of all P-values, 2: product-of-P-values, 3: truncated product", typeid(int), (void*) &aggregationMode, "^[0-4]{1}$"),
// concatdb
PARAM_PRESERVEKEYS(PARAM_PRESERVEKEYS_ID,"--preserve-keys", "Preserve the keys", "the keys of the two DB should be distinct, and they will be preserved in the concatenation.",typeid(bool), (void *) &preserveKeysB, ""),
PARAM_TAKE_LARGER_ENTRY(PARAM_TAKE_LARGER_ENTRY_ID,"--take-larger-entry", "Take the larger entry", "only keeps the larger entry (dataSize >) in the concatenation, both databases need the same keys in the index",typeid(bool), (void *) &takeLargerEntry, ""),
Expand Down
1 change: 0 additions & 1 deletion src/commons/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ class Parameters {
static const int AGGREGATION_MODE_MIN_PVAL = 1;
static const int AGGREGATION_MODE_PRODUCT = 2;
static const int AGGREGATION_MODE_TRUNCATED_PRODUCT = 3;
static const int AGGREGATION_MODE_RANK_TRUNCATED_PRODUCT = 4;

// header type
static const int HEADER_TYPE_UNICLUST = 1;
Expand Down
3 changes: 1 addition & 2 deletions src/multihit/Aggregation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ int Aggregation::run() {
buffer.clear();
}
};
//TODO what dbtype?
writer.close(true);
writer.close();
reader.close();

return EXIT_SUCCESS;
Expand Down
6 changes: 3 additions & 3 deletions src/multihit/besthitperset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public :
std::string aggregateEntry(std::vector<std::vector<std::string>> &dataToAggregate, unsigned int, unsigned int targetSetKey, unsigned int thread_idx) {
std::string buffer;
buffer.reserve(1024);

double bestScore = -DBL_MAX;
double secondBestScore = -DBL_MAX;
double bestEval = DBL_MAX;
Expand All @@ -48,15 +48,15 @@ public :
unsigned int nbrGenes = Util::fast_atoi<unsigned int>(data);

std::vector<std::string> *bestEntry = NULL;
for (size_t i = 0; i < dataToAggregate.size(); i++) {
for (size_t i = 0; i < dataToAggregate.size(); i++) {
double eval = strtod(dataToAggregate[i][3].c_str(), NULL);
double pval = eval/nbrGenes;
//prevent log(0)
if (pval == 0) {
pval = DBL_MIN;
}
double score = -log(pval);

//if only one hit use simple best hit
if(simpleBestHitMode ||dataToAggregate.size() < 2) {
if(bestEval > eval){
Expand Down
2 changes: 1 addition & 1 deletion src/util/mergeresultsbyset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int mergeresultsbyset(int argc, const char **argv, const Command &command) {
buffer.clear();
}
}
dbw.close(true);
dbw.close();
resultReader.close();
setReader.close();

Expand Down

0 comments on commit 74279ab

Please sign in to comment.