From a66ad0c27f80457ce18602cda7fc0925894cbdc8 Mon Sep 17 00:00:00 2001 From: Milot Mirdita Date: Wed, 13 Nov 2024 13:54:30 +0900 Subject: [PATCH] Allow easy-search to work with --gpu 1 --- data/workflow/easysearch.sh | 17 +++++++++++++++++ src/workflow/EasySearch.cpp | 2 ++ 2 files changed, 19 insertions(+) diff --git a/data/workflow/easysearch.sh b/data/workflow/easysearch.sh index f6443fc49..778657d15 100755 --- a/data/workflow/easysearch.sh +++ b/data/workflow/easysearch.sh @@ -21,6 +21,15 @@ if notExists "${TARGET}.dbtype"; then || fail "target createdb died" fi TARGET="${TMP_PATH}/target" + + if [ -n "${GPU}" ]; then + if notExists "${TMP_PATH}/target_pad"; then + # shellcheck disable=SC2086 + "$MMSEQS" makepaddedseqdb "${TMP_PATH}/target" "${TMP_PATH}/target_pad" ${MAKEPADDEDSEQDB_PAR} \ + || fail "makepaddedseqdb died" + fi + TARGET="${TMP_PATH}/target_pad" + fi fi if [ -n "${LINSEARCH}" ] && notExists "${TARGET}.linidx"; then @@ -66,6 +75,14 @@ if [ -n "${REMOVE_TMP}" ]; then # shellcheck disable=SC2086 "$MMSEQS" rmdb "${TMP_PATH}/target_h" ${VERBOSITY} fi + + if [ -f "${TMP_PATH}/target_pad" ]; then + # shellcheck disable=SC2086 + "$MMSEQS" rmdb "${TMP_PATH}/target_pad" ${VERBOSITY} + # shellcheck disable=SC2086 + "$MMSEQS" rmdb "${TMP_PATH}/target_pad_h" ${VERBOSITY} + fi + # shellcheck disable=SC2086 "$MMSEQS" rmdb "${TMP_PATH}/query" ${VERBOSITY} # shellcheck disable=SC2086 diff --git a/src/workflow/EasySearch.cpp b/src/workflow/EasySearch.cpp index 0552a0dac..d2958a6d3 100644 --- a/src/workflow/EasySearch.cpp +++ b/src/workflow/EasySearch.cpp @@ -138,6 +138,8 @@ int doeasysearch(int argc, const char **argv, const Command &command, bool linse par.shuffleDatabase = origShuffle; par.createdbMode = Parameters::SEQUENCE_SPLIT_MODE_HARD; cmd.addVariable("CREATEDB_PAR", par.createParameterString(par.createdb).c_str()); + cmd.addVariable("GPU", par.gpu ? "TRUE" : NULL); + cmd.addVariable("MAKEPADDEDSEQDB_PAR", par.createParameterString(par.makepaddedseqdb).c_str()); cmd.addVariable("CONVERT_PAR", par.createParameterString(par.convertalignments).c_str()); cmd.addVariable("SUMMARIZE_PAR", par.createParameterString(par.summarizeresult).c_str());