Skip to content

Commit

Permalink
Add GPU support to easy-rbh
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Nov 21, 2024
1 parent 41c7eea commit c3aa34a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
30 changes: 30 additions & 0 deletions data/workflow/easyrbh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,31 @@ if notExists "${TMP_PATH}/query.dbtype"; then
QUERY="${TMP_PATH}/query"
fi

if [ -n "${GPU}" ]; then
if notExists "${TMP_PATH}/query_pad"; then
# shellcheck disable=SC2086
"$MMSEQS" makepaddedseqdb "${TMP_PATH}/query" "${TMP_PATH}/query_pad" ${MAKEPADDEDSEQDB_PAR} \
|| fail "makepaddedseqdb died"
fi
QUERY="${TMP_PATH}/query_pad"
fi

if notExists "${TARGET}.dbtype"; then
if notExists "${TMP_PATH}/target"; then
# shellcheck disable=SC2086
"$MMSEQS" createdb "${TARGET}" "${TMP_PATH}/target" ${CREATEDB_PAR} \
|| 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 notExists "${INTERMEDIATE}.dbtype"; then
Expand All @@ -46,10 +64,22 @@ 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
"$MMSEQS" rmdb "${TMP_PATH}/query_h" ${VERBOSITY}
if [ -f "${TMP_PATH}/query_pad" ]; then
# shellcheck disable=SC2086
"$MMSEQS" rmdb "${TMP_PATH}/query_pad" ${VERBOSITY}
# shellcheck disable=SC2086
"$MMSEQS" rmdb "${TMP_PATH}/query_pad_h" ${VERBOSITY}
fi
fi
rm -rf "${TMP_PATH}/rbh_tmp"
rm -f "${TMP_PATH}/easyrbh.sh"
Expand Down
1 change: 1 addition & 0 deletions src/commons/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,7 @@ Parameters::Parameters():
easysearchworkflow = combineList(searchworkflow, convertalignments);
easysearchworkflow = combineList(easysearchworkflow, summarizeresult);
easysearchworkflow = combineList(easysearchworkflow, createdb);
easysearchworkflow = combineList(easysearchworkflow, makepaddedseqdb);
easysearchworkflow.push_back(&PARAM_GREEDY_BEST_HITS);
// createindex workflow
Expand Down
1 change: 1 addition & 0 deletions src/workflow/EasyRbh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ int easyrbh(int argc, const char **argv, const Command &command) {
CommandCaller cmd;
cmd.addVariable("TMP_PATH", tmpDir.c_str());
cmd.addVariable("RESULTS", par.filenames.back().c_str());
cmd.addVariable("MAKEPADDEDSEQDB_PAR", par.createParameterString(par.makepaddedseqdb).c_str());
par.filenames.pop_back();
std::string target = par.filenames.back().c_str();
cmd.addVariable("TARGET", target.c_str());
Expand Down

0 comments on commit c3aa34a

Please sign in to comment.