diff --git a/src/clustering/Clustering.cpp b/src/clustering/Clustering.cpp index f1f255aea..0a7e1433c 100644 --- a/src/clustering/Clustering.cpp +++ b/src/clustering/Clustering.cpp @@ -31,6 +31,7 @@ Clustering::Clustering(const std::string &seqDB, const std::string &seqDBIndex, } seqDbr->sortIndex(localid2weight); delete[] localid2weight; + delete sequenceWeights; } else seqDbr->open(DBReader::SORT_BY_LENGTH); diff --git a/src/commons/Parameters.cpp b/src/commons/Parameters.cpp index 9256116d8..e684da32b 100644 --- a/src/commons/Parameters.cpp +++ b/src/commons/Parameters.cpp @@ -152,7 +152,7 @@ Parameters::Parameters(): 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_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, "--weightThr", "Weight threshold", "Weight threshold used for cluster priorization", typeid(float), (void*) &weightThr, "^[0-9]*(\\.[0-9]+)?$", 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 ), // workflow PARAM_RUNNER(PARAM_RUNNER_ID, "--mpi-runner", "MPI runner", "Use MPI on compute cluster with this MPI command (e.g. \"mpirun -np 42\")", typeid(std::string), (void *) &runner, "", MMseqsParameter::COMMAND_COMMON | MMseqsParameter::COMMAND_EXPERT), PARAM_REUSELATEST(PARAM_REUSELATEST_ID, "--force-reuse", "Force restart with latest tmp", "Reuse tmp filse in tmp/latest folder ignoring parameters and version changes", typeid(bool), (void *) &reuseLatest, "", MMseqsParameter::COMMAND_COMMON | MMseqsParameter::COMMAND_EXPERT), diff --git a/src/commons/SequenceWeights.cpp b/src/commons/SequenceWeights.cpp index e9688e82c..8cc8cfc8a 100644 --- a/src/commons/SequenceWeights.cpp +++ b/src/commons/SequenceWeights.cpp @@ -53,3 +53,7 @@ float SequenceWeights::getWeightById(unsigned int id) { return (pos < indexSize && weightIndex[pos].id == id ) ? weightIndex[pos].weight : std::numeric_limits::min(); } +SequenceWeights::~SequenceWeights() { + delete[] weightIndex; +} + diff --git a/src/linclust/kmermatcher.cpp b/src/linclust/kmermatcher.cpp index 804a8fe1c..3e0740c59 100644 --- a/src/linclust/kmermatcher.cpp +++ b/src/linclust/kmermatcher.cpp @@ -488,6 +488,8 @@ KmerPosition * doComputation(size_t totalKmers, size_t hashStartRange, size_t writePos = assignGroup(hashSeqPair, totalKmers, par.includeOnlyExtendable, par.covMode, par.covThr, sequenceWeights, par.weightThr); } + delete sequenceWeights; + // sort by rep. sequence (stored in kmer) and sequence id Debug(Debug::INFO) << "Sort by rep. sequence "; timer.reset();