Skip to content

Commit

Permalink
[expandcomplex] eased e-value for the 2nd alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Woosub-Kim committed Jan 20, 2024
1 parent e9f76df commit bb09017
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/commons/LocalParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ LocalParameters::LocalParameters() :
PARAM_FILE_INCLUDE(PARAM_FILE_INCLUDE_ID, "--file-include", "File Inclusion Regex", "Include file names based on this regex", typeid(std::string), (void *) &fileInclude, "^.*$"),
PARAM_FILE_EXCLUDE(PARAM_FILE_EXCLUDE_ID, "--file-exclude", "File Exclusion Regex", "Exclude file names based on this regex", typeid(std::string), (void *) &fileExclude, "^.*$"),
PARAM_INDEX_EXCLUDE(PARAM_INDEX_EXCLUDE_ID, "--index-exclude", "Index Exclusion", "Exclude parts of the index:\n0: Full index\n1: Exclude k-mer index (for use with --prefilter-mode 1)\n2: Exclude C-alpha coordinates (for use with --sort-by-structure-bits 0)\nFlags can be combined bit wise", typeid(int), (void *) &indexExclude, "^[0-3]{1}$", MMseqsParameter::COMMAND_EXPERT),
PARAM_COMPLEX_REPORT_MODE(PARAM_COMPLEX_REPORT_MODE_ID, "--complex-report-mode", "Complex report mode", "Complex report mode:\n0: No report\n1: Write complex report", typeid(int), (void *) &complexReportMode, "^[0-1]{1}$", MMseqsParameter::COMMAND_EXPERT)
PARAM_COMPLEX_REPORT_MODE(PARAM_COMPLEX_REPORT_MODE_ID, "--complex-report-mode", "Complex report mode", "Complex report mode:\n0: No report\n1: Write complex report", typeid(int), (void *) &complexReportMode, "^[0-1]{1}$", MMseqsParameter::COMMAND_EXPERT),
PARAM_EXPAND_COMPLEX_EVALUE(PARAM_EXPAND_COMPLEX_EVALUE_ID, "--expand-complex-evalue", "E-value threshold for expandcomplex", "E-value threshold for expandcomplex (range 0.0-inf)", typeid(double), (void *) &eValueThrExpandComplex, "^([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)|[0-9]*(\\.[0-9]+)?$", MMseqsParameter::COMMAND_ALIGN)
{
PARAM_ALIGNMENT_MODE.description = "How to compute the alignment:\n0: automatic\n1: only score and end_pos\n2: also start_pos and cov\n3: also seq.id";
PARAM_ALIGNMENT_MODE.regex = "^[0-3]{1}$";
Expand Down Expand Up @@ -178,6 +179,7 @@ LocalParameters::LocalParameters() :

// complexsearchworkflow
complexsearchworkflow = combineList(structuresearchworkflow, scorecomplex);
complexsearchworkflow.push_back(&PARAM_EXPAND_COMPLEX_EVALUE);

// easycomplexsearchworkflow
easyscomplexsearchworkflow = combineList(structurecreatedb, complexsearchworkflow);
Expand Down Expand Up @@ -212,6 +214,7 @@ LocalParameters::LocalParameters() :
dbSuffixList = "_h,_ss,_ca";
indexExclude = 0;
complexReportMode = 1;
eValueThrExpandComplex = 10000.0;
citations.emplace(CITATION_FOLDSEEK, "van Kempen, M., Kim, S.S., Tumescheit, C., Mirdita, M., Lee, J., Gilchrist, C.L.M., Söding, J., and Steinegger, M. Fast and accurate protein structure search with Foldseek. Nature Biotechnology, doi:10.1038/s41587-023-01773-0 (2023)");

//rewrite param vals.
Expand Down
2 changes: 2 additions & 0 deletions src/commons/LocalParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class LocalParameters : public Parameters {
PARAMETER(PARAM_FILE_EXCLUDE)
PARAMETER(PARAM_INDEX_EXCLUDE)
PARAMETER(PARAM_COMPLEX_REPORT_MODE)
PARAMETER(PARAM_EXPAND_COMPLEX_EVALUE)

int prefMode;
float tmScoreThr;
Expand All @@ -131,6 +132,7 @@ class LocalParameters : public Parameters {
std::string fileExclude;
int indexExclude;
int complexReportMode;
double eValueThrExpandComplex;

static std::vector<int> getOutputFormat(int formatMode, const std::string &outformat, bool &needSequences, bool &needBacktrace, bool &needFullHeaders,
bool &needLookup, bool &needSource, bool &needTaxonomyMapping, bool &needTaxonomy, bool &needQCa, bool &needTCa, bool &needTMaligner,
Expand Down
6 changes: 5 additions & 1 deletion src/workflow/ComplexSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "complexsearch.sh.h"


int complexsearch(int argc, const char **argv, const Command &command) {
LocalParameters &par = LocalParameters::getLocalInstance();
par.PARAM_ADD_BACKTRACE.addCategory(MMseqsParameter::COMMAND_EXPERT);
Expand Down Expand Up @@ -70,14 +71,17 @@ int complexsearch(int argc, const char **argv, const Command &command) {
tmpDir = FileUtil::createTemporaryDirectory(tmpDir, hash);
par.filenames.pop_back();
CommandCaller cmd;
double eval = par.evalThr;
if(par.alignmentType == LocalParameters::ALIGNMENT_TYPE_TMALIGN){
par.evalThr = par.eValueThrExpandComplex;
cmd.addVariable("COMPLEX_ALIGNMENT_ALGO", "tmalign");
cmd.addVariable("COMPLEX_ALIGN_PAR", par.createParameterString(par.tmalign).c_str());
}else if(par.alignmentType == LocalParameters::ALIGNMENT_TYPE_3DI_AA || par.alignmentType == LocalParameters::ALIGNMENT_TYPE_3DI){
par.evalThr = par.eValueThrExpandComplex;
cmd.addVariable("COMPLEX_ALIGNMENT_ALGO", "structurealign");
cmd.addVariable("COMPLEX_ALIGN_PAR", par.createParameterString(par.structurealign).c_str());
}

par.evalThr = eval;
switch(par.prefMode){
case LocalParameters::PREF_MODE_KMER:
cmd.addVariable("PREFMODE", "KMER");
Expand Down

0 comments on commit bb09017

Please sign in to comment.