Skip to content

Commit

Permalink
Add --complex-report-mode to allow disabling report in easy-scorecomplex
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Nov 23, 2023
1 parent 38290cf commit 79f865d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 5 additions & 3 deletions data/easycomplexsearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ fi
"$MMSEQS" convertalis "${QUERY}" "${TARGET}" "${TMP_PATH}/result2" "${OUTPUT}" ${CONVERT_PAR} \
|| fail "Convert Alignments died"

# shellcheck disable=SC2086
"$MMSEQS" createcomplexreport "${QUERY}" "${TARGET}" "${TMP_PATH}/result2" "${OUTPUT}_report" ${REPORT_PAR} \
|| fail "createcomplexreport died"
if [ -z "${NO_REPORT}" ]; then
# shellcheck disable=SC2086
"$MMSEQS" createcomplexreport "${QUERY}" "${TARGET}" "${TMP_PATH}/result2" "${OUTPUT}_report" ${REPORT_PAR} \
|| fail "createcomplexreport died"
fi

if [ -n "${REMOVE_TMP}" ]; then
# shellcheck disable=SC2086
Expand Down
5 changes: 4 additions & 1 deletion src/commons/LocalParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ LocalParameters::LocalParameters() :
PARAM_CLUSTER_SEARCH(PARAM_CLUSTER_SEARCH_ID, "--cluster-search", "Cluster search", "first find representative then align all cluster members", typeid(int), (void *) &clusterSearch, "^[0-1]{1}$",MMseqsParameter::COMMAND_MISC),
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_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_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 @@ -180,6 +181,7 @@ LocalParameters::LocalParameters() :
easyscorecomplexworkflow = combineList(easyscorecomplexworkflow, scorecomplex);
easyscorecomplexworkflow = combineList(easyscorecomplexworkflow, convertalignments);
easyscorecomplexworkflow = combineList(easyscorecomplexworkflow, createcomplexreport);
easyscorecomplexworkflow.push_back(&PARAM_COMPLEX_REPORT_MODE);

prefMode = PREF_MODE_KMER;
alignmentType = ALIGNMENT_TYPE_3DI_AA;
Expand All @@ -203,6 +205,7 @@ LocalParameters::LocalParameters() :
fileExclude = "^$";
dbSuffixList = "_h,_ss,_ca";
indexExclude = 0;
complexReportMode = 1;
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 @@ -109,6 +109,7 @@ class LocalParameters : public Parameters {
PARAMETER(PARAM_FILE_INCLUDE)
PARAMETER(PARAM_FILE_EXCLUDE)
PARAMETER(PARAM_INDEX_EXCLUDE)
PARAMETER(PARAM_COMPLEX_REPORT_MODE)

int prefMode;
float tmScoreThr;
Expand All @@ -127,6 +128,7 @@ class LocalParameters : public Parameters {
std::string fileInclude;
std::string fileExclude;
int indexExclude;
int complexReportMode;

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
1 change: 1 addition & 0 deletions src/workflow/EasyComplexSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ int easycomplexsearch(int argc, const char **argv, const Command &command) {
tmpDir = FileUtil::createTemporaryDirectory(tmpDir, hash);
par.filenames.pop_back();
CommandCaller cmd;
cmd.addVariable("NO_REPORT", par.complexReportMode == 0 ? "TRUE" : NULL);
cmd.addVariable("TMP_PATH", tmpDir.c_str());
cmd.addVariable("OUTPUT", par.filenames.back().c_str());
par.filenames.pop_back();
Expand Down

0 comments on commit 79f865d

Please sign in to comment.