Permalink
Browse files

Use new sortresult module in slice search workflow

  • Loading branch information...
milot-mirdita committed Oct 9, 2018
1 parent cb5b70f commit d69fe70c3680f1de5c0d408e3114ec8747a1eb34
Showing with 5 additions and 10 deletions.
  1. +4 −10 data/searchslicedtargetprofile.sh
  2. +1 −0 src/workflow/Search.cpp
@@ -71,7 +71,7 @@ while [ "${STEP}" -lt "${MAX_STEPS}" ] && [ "${NUM_PROFILES}" -gt 0 ]; do
read -r NUM_PROFILES OFFSET < "${TMP_PATH}/aln_${STEP}.checkpoint"
continue
fi
# Compute the max number of sequence according to the number of profiles
# 90 bytes/query-result line max.
MAX_SEQS="$((1024*(AVAIL_DISK/NUM_PROFILES)/90))"
@@ -133,21 +133,15 @@ while [ "${STEP}" -lt "${MAX_STEPS}" ] && [ "${NUM_PROFILES}" -gt 0 ]; do
"$MMSEQS" mergedbs "${INPUT}" "${TMP_PATH}/aln_merged_new" "${TMP_PATH}/aln_merged" "${TMP_PATH}/aln_swap" ${VERBOSITY_PAR} \
|| fail "mergedbs died"
# shellcheck disable=SC2086
"$MMSEQS" filterdb "${TMP_PATH}/aln_merged_new" "${TMP_PATH}/aln_merged" \
--sort-entries 2 --filter-column 2 ${THREADS_PAR} \
|| fail "filterdb (sorting) died"
rm -f "${TMP_PATH}/aln_swap" "${TMP_PATH}/aln_swap.index"
rm -f "${TMP_PATH}/aln_merged_new" "${TMP_PATH}/aln_merged_new.index"
MERGED="${TMP_PATH}/aln_merged"
fi
# keep only the top MAX_RESULTS_PER_QUERY hits according to evalue
# keep only the top max-seqs hits according to the default alignment sorting criteria
# shellcheck disable=SC2086
"$MMSEQS" filterdb "${MERGED}" "${TMP_PATH}/aln_merged_trunc" \
--extract-lines "$MAX_RESULTS_PER_QUERY" ${THREADS_PAR} \
|| fail "filterdb (extract lines) died"
"$MMSEQS" sortresult "${MERGED}" "${TMP_PATH}/aln_merged_trunc" ${SORTRESULT_PAR} \
|| fail "sortresult died"
mv -f "${TMP_PATH}/aln_merged_trunc" "${TMP_PATH}/aln_merged"
mv -f "${TMP_PATH}/aln_merged_trunc.index" "${TMP_PATH}/aln_merged.index"
View
@@ -166,6 +166,7 @@ int search(int argc, const char **argv, const Command& command) {
cmd.addVariable("PREFILTER_PAR", par.createParameterString(prefilter).c_str());
cmd.addVariable("SWAP_PAR", par.createParameterString(par.swapresult).c_str());
cmd.addVariable("ALIGNMENT_PAR", par.createParameterString(par.align).c_str());
cmd.addVariable("SORTRESULT_PAR", par.createParameterString(par.sortresult).c_str());
cmd.addVariable("THREADS_PAR", par.createParameterString(par.onlythreads).c_str());
cmd.addVariable("VERBOSITY_PAR", par.createParameterString(par.onlyverbosity).c_str());

0 comments on commit d69fe70

Please sign in to comment.