Skip to content

Commit

Permalink
Merge branch 'linclust_integration' of https://github.com/leejoey0921…
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Dec 14, 2024
2 parents 7f5c000 + ecea89f commit 738ca2f
Show file tree
Hide file tree
Showing 4 changed files with 434 additions and 132 deletions.
8 changes: 4 additions & 4 deletions src/commons/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Parameters::Parameters():
PARAM_IGNORE_MULTI_KMER(PARAM_IGNORE_MULTI_KMER_ID, "--ignore-multi-kmer", "Skip repeating k-mers", "Skip k-mers occurring multiple times (>=2)", typeid(bool), (void *) &ignoreMultiKmer, "", MMseqsParameter::COMMAND_CLUSTLINEAR | MMseqsParameter::COMMAND_EXPERT),
PARAM_HASH_SHIFT(PARAM_HASH_SHIFT_ID, "--hash-shift", "Shift hash", "Shift k-mer hash initialization", typeid(int), (void *) &hashShift, "^[1-9]{1}[0-9]*$", MMseqsParameter::COMMAND_CLUSTLINEAR | MMseqsParameter::COMMAND_EXPERT),
PARAM_PICK_N_SIMILAR(PARAM_PICK_N_SIMILAR_ID, "--pick-n-sim-kmer", "Add N similar to search", "Add N similar k-mers to search", typeid(int), (void *) &pickNbest, "^[1-9]{1}[0-9]*$", MMseqsParameter::COMMAND_CLUSTLINEAR | MMseqsParameter::COMMAND_EXPERT),
PARAM_ADJUST_KMER_LEN(PARAM_ADJUST_KMER_LEN_ID, "--adjust-kmer-len", "Adjust k-mer length", "Adjust k-mer length based on specificity (only for nucleotides)", typeid(bool), (void *) &adjustKmerLength, "", MMseqsParameter::COMMAND_CLUSTLINEAR | MMseqsParameter::COMMAND_EXPERT),
PARAM_MATCH_ADJACENT_SEQ(PARAM_MATCH_ADJACENT_SEQ_ID, "--match-adjacent-seq", "Compare adjacent sequences to k-mers", "Compare sequence information adjacent to k-mers and elect multiple representative sequences per cluster", typeid(bool), (void *) &matchAdjacentSeq, "", MMseqsParameter::COMMAND_CLUSTLINEAR),
PARAM_RESULT_DIRECTION(PARAM_RESULT_DIRECTION_ID, "--result-direction", "Result direction", "result is 0: query, 1: target centric", typeid(int), (void *) &resultDirection, "^[0-1]{1}$", MMseqsParameter::COMMAND_CLUSTLINEAR | MMseqsParameter::COMMAND_EXPERT),
PARAM_WEIGHT_FILE(PARAM_WEIGHT_FILE_ID, "--weights", "Weight file name", "Weights used for cluster priorization", typeid(std::string), (void*) &weightFile, "", MMseqsParameter::COMMAND_CLUSTLINEAR | MMseqsParameter::COMMAND_EXPERT ),
PARAM_WEIGHT_THR(PARAM_WEIGHT_THR_ID, "--cluster-weight-threshold", "Cluster Weight threshold", "Weight threshold used for cluster priorization", typeid(float), (void*) &weightThr, "^[0-9]*(\\.[0-9]+)?$", MMseqsParameter::COMMAND_CLUSTLINEAR | MMseqsParameter::COMMAND_EXPERT ),
Expand Down Expand Up @@ -811,7 +811,6 @@ Parameters::Parameters():
kmerindexdb.push_back(&PARAM_KMER_PER_SEQ);
kmerindexdb.push_back(&PARAM_KMER_PER_SEQ_SCALE);
kmerindexdb.push_back(&PARAM_MIN_SEQ_ID);
kmerindexdb.push_back(&PARAM_ADJUST_KMER_LEN);
kmerindexdb.push_back(&PARAM_SPLIT_MEMORY_LIMIT);
kmerindexdb.push_back(&PARAM_IGNORE_MULTI_KMER);
kmerindexdb.push_back(&PARAM_ALPH_SIZE);
Expand Down Expand Up @@ -993,7 +992,6 @@ Parameters::Parameters():
kmermatcher.push_back(&PARAM_SPACED_KMER_MODE);
kmermatcher.push_back(&PARAM_SPACED_KMER_PATTERN);
kmermatcher.push_back(&PARAM_KMER_PER_SEQ_SCALE);
kmermatcher.push_back(&PARAM_ADJUST_KMER_LEN);
kmermatcher.push_back(&PARAM_MASK_RESIDUES);
kmermatcher.push_back(&PARAM_MASK_PROBABILTY);
kmermatcher.push_back(&PARAM_MASK_LOWER_CASE);
Expand Down Expand Up @@ -2580,10 +2578,12 @@ void Parameters::setDefaults() {
ignoreMultiKmer = false;
hashShift = 67;
pickNbest = 1;
adjustKmerLength = false;
resultDirection = Parameters::PARAM_RESULT_DIRECTION_TARGET;
weightThr = 0.9;
weightFile = "";
// TODO: change to true after fixing regression tests
matchAdjacentSeq = false;
hashSeqBuffer = 1.05;

// result2stats
stat = "";
Expand Down
5 changes: 3 additions & 2 deletions src/commons/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,11 @@ class Parameters {
bool ignoreMultiKmer;
int hashShift;
int pickNbest;
int adjustKmerLength;
int resultDirection;
float weightThr;
std::string weightFile;
bool matchAdjacentSeq;
float hashSeqBuffer;

// indexdb
int checkCompatible;
Expand Down Expand Up @@ -880,7 +881,7 @@ class Parameters {
PARAMETER(PARAM_IGNORE_MULTI_KMER)
PARAMETER(PARAM_HASH_SHIFT)
PARAMETER(PARAM_PICK_N_SIMILAR)
PARAMETER(PARAM_ADJUST_KMER_LEN)
PARAMETER(PARAM_MATCH_ADJACENT_SEQ)
PARAMETER(PARAM_RESULT_DIRECTION)
PARAMETER(PARAM_WEIGHT_FILE)
PARAMETER(PARAM_WEIGHT_THR)
Expand Down
Loading

0 comments on commit 738ca2f

Please sign in to comment.