Skip to content

Commit c3aa34a

Browse files
committed
Add GPU support to easy-rbh
1 parent 41c7eea commit c3aa34a

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

data/workflow/easyrbh.sh

+30
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,31 @@ if notExists "${TMP_PATH}/query.dbtype"; then
1515
QUERY="${TMP_PATH}/query"
1616
fi
1717

18+
if [ -n "${GPU}" ]; then
19+
if notExists "${TMP_PATH}/query_pad"; then
20+
# shellcheck disable=SC2086
21+
"$MMSEQS" makepaddedseqdb "${TMP_PATH}/query" "${TMP_PATH}/query_pad" ${MAKEPADDEDSEQDB_PAR} \
22+
|| fail "makepaddedseqdb died"
23+
fi
24+
QUERY="${TMP_PATH}/query_pad"
25+
fi
26+
1827
if notExists "${TARGET}.dbtype"; then
1928
if notExists "${TMP_PATH}/target"; then
2029
# shellcheck disable=SC2086
2130
"$MMSEQS" createdb "${TARGET}" "${TMP_PATH}/target" ${CREATEDB_PAR} \
2231
|| fail "target createdb died"
2332
fi
2433
TARGET="${TMP_PATH}/target"
34+
35+
if [ -n "${GPU}" ]; then
36+
if notExists "${TMP_PATH}/target_pad"; then
37+
# shellcheck disable=SC2086
38+
"$MMSEQS" makepaddedseqdb "${TMP_PATH}/target" "${TMP_PATH}/target_pad" ${MAKEPADDEDSEQDB_PAR} \
39+
|| fail "makepaddedseqdb died"
40+
fi
41+
TARGET="${TMP_PATH}/target_pad"
42+
fi
2543
fi
2644

2745
if notExists "${INTERMEDIATE}.dbtype"; then
@@ -46,10 +64,22 @@ if [ -n "${REMOVE_TMP}" ]; then
4664
# shellcheck disable=SC2086
4765
"$MMSEQS" rmdb "${TMP_PATH}/target_h" ${VERBOSITY}
4866
fi
67+
if [ -f "${TMP_PATH}/target_pad" ]; then
68+
# shellcheck disable=SC2086
69+
"$MMSEQS" rmdb "${TMP_PATH}/target_pad" ${VERBOSITY}
70+
# shellcheck disable=SC2086
71+
"$MMSEQS" rmdb "${TMP_PATH}/target_pad_h" ${VERBOSITY}
72+
fi
4973
# shellcheck disable=SC2086
5074
"$MMSEQS" rmdb "${TMP_PATH}/query" ${VERBOSITY}
5175
# shellcheck disable=SC2086
5276
"$MMSEQS" rmdb "${TMP_PATH}/query_h" ${VERBOSITY}
77+
if [ -f "${TMP_PATH}/query_pad" ]; then
78+
# shellcheck disable=SC2086
79+
"$MMSEQS" rmdb "${TMP_PATH}/query_pad" ${VERBOSITY}
80+
# shellcheck disable=SC2086
81+
"$MMSEQS" rmdb "${TMP_PATH}/query_pad_h" ${VERBOSITY}
82+
fi
5383
fi
5484
rm -rf "${TMP_PATH}/rbh_tmp"
5585
rm -f "${TMP_PATH}/easyrbh.sh"

src/commons/Parameters.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,7 @@ Parameters::Parameters():
13021302
easysearchworkflow = combineList(searchworkflow, convertalignments);
13031303
easysearchworkflow = combineList(easysearchworkflow, summarizeresult);
13041304
easysearchworkflow = combineList(easysearchworkflow, createdb);
1305+
easysearchworkflow = combineList(easysearchworkflow, makepaddedseqdb);
13051306
easysearchworkflow.push_back(&PARAM_GREEDY_BEST_HITS);
13061307
13071308
// createindex workflow

src/workflow/EasyRbh.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ int easyrbh(int argc, const char **argv, const Command &command) {
7575
CommandCaller cmd;
7676
cmd.addVariable("TMP_PATH", tmpDir.c_str());
7777
cmd.addVariable("RESULTS", par.filenames.back().c_str());
78+
cmd.addVariable("MAKEPADDEDSEQDB_PAR", par.createParameterString(par.makepaddedseqdb).c_str());
7879
par.filenames.pop_back();
7980
std::string target = par.filenames.back().c_str();
8081
cmd.addVariable("TARGET", target.c_str());

0 commit comments

Comments
 (0)