Skip to content
Permalink
Browse files

Cleanup merge issues

  • Loading branch information...
RuoshiZhang committed Sep 3, 2019
1 parent b984c95 commit 74279abf57065b4c97ce256770fbbbfd1d18bede
@@ -40,5 +40,5 @@ BacteriaBench/
EliTestFiles/
NCBI_Bacteria_Orfs/
build.old/
.vscode/c_cpp_properties.json
.vscode/
vsc.code-workspace

This file was deleted.

This file was deleted.

@@ -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
@@ -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, ""),
@@ -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;
@@ -84,8 +84,7 @@ int Aggregation::run() {
buffer.clear();
}
};
//TODO what dbtype?
writer.close(true);
writer.close();
reader.close();

return EXIT_SUCCESS;
@@ -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;
@@ -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){
@@ -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();

0 comments on commit 74279ab

Please sign in to comment.
You can’t perform that action at this time.