Permalink
Browse files

dbtype journey continues

  • Loading branch information...
milot-mirdita committed Dec 5, 2018
1 parent d1cf8a6 commit ff2085a548ecb675c362500b91a2385041ed8575
Showing with 24 additions and 5 deletions.
  1. +4 −2 data/multihitdb.sh
  2. +10 −1 data/update_clustering.sh
  3. +10 −2 src/commons/DBReader.h
@@ -19,11 +19,13 @@ fi
if [ "$("${MMSEQS}" dbtype "${OUTDB}")" = "Nucleotide" ]; then
mv -f "${OUTDB}" "${OUTDB}_nucl"
mv -f "${OUTDB}.index" "${OUTDB}_nucl.index"
mv -f "${OUTDB}_h" "${OUTDB}_nucl_h"
mv -f "${OUTDB}_h.index" "${OUTDB}_nucl_h.index"
mv -f "${OUTDB}.lookup" "${OUTDB}_nucl.lookup"
mv -f "${OUTDB}.dbtype" "${OUTDB}_nucl.dbtype"
mv -f "${OUTDB}_h" "${OUTDB}_nucl_h"
mv -f "${OUTDB}_h.index" "${OUTDB}_nucl_h.index"
mv -f "${OUTDB}_h.dbtype" "${OUTDB}_nucl_h.dbtype"
if notExists "${OUTDB}_nucl_contig_to_set"; then
awk '{ print $1"\t"$3; }' "${OUTDB}_nucl.lookup" | sort -k1,1n -k2,2n > "${OUTDB}_nucl_contig_to_set.tsv"
"${MMSEQS}" tsv2db "${OUTDB}_nucl_contig_to_set.tsv" "${OUTDB}_nucl_contig_to_set" \
@@ -229,6 +229,10 @@ else
ln -sf "$OLDCLUST.index" "${TMP_PATH}/updatedClust.index" \
|| fail "Mv Oldclust to update died"
fi
if notExists "${TMP_PATH}/updatedClust.dbtype"; then
ln -sf "$OLDCLUST.dbtype" "${TMP_PATH}/updatedClust.dbtype" \
|| fail "Mv Oldclust to update died"
fi
fi
debugWait
@@ -279,6 +283,11 @@ else
mv "${TMP_PATH}/updatedClust.index" "${NEWCLUST}.index" \
|| fail "Mv died"
fi
if notExists "${NEWCLUST}.dbtype"; then
mv "${TMP_PATH}/updatedClust.dbtype" "${NEWCLUST}.dbtype" \
|| fail "Mv died"
fi
fi
debugWait
@@ -296,7 +305,7 @@ if [ -n "$REMOVE_TMP" ]; then
"${TMP_PATH}/mappingSeqs" "${TMP_PATH}/newSeqs" "${TMP_PATH}/removedSeqs"
rm -f "${TMP_PATH}/OLDDB.repSeq" "${TMP_PATH}/OLDDB.repSeq.index" \
"${TMP_PATH}/updatedClust" "${TMP_PATH}/updatedClust.index"
"${TMP_PATH}/updatedClust" "${TMP_PATH}/updatedClust.index" "${TMP_PATH}/updatedClust.dbtype"
rmdir "${TMP_PATH}/search" "${TMP_PATH}/cluster"
@@ -143,17 +143,25 @@ class DBReader {
return dbtype;
}
const char* getDbTypeName() {
const char* getDbTypeName() const {
return getDbTypeName(dbtype);
}
static const char* getDbTypeName(int dbtype) {
switch(dbtype) {
switch (dbtype & 0x7FFFFFFF) {
case Parameters::DBTYPE_AMINO_ACIDS: return "Aminoacid";
case Parameters::DBTYPE_NUCLEOTIDES: return "Nucleotide";
case Parameters::DBTYPE_HMM_PROFILE: return "Profile";
case Parameters::DBTYPE_PROFILE_STATE_SEQ: return "Profile state";
case Parameters::DBTYPE_PROFILE_STATE_PROFILE: return "Profile profile";
case Parameters::DBTYPE_ALIGNMENT_RES: return "Alignment";
case Parameters::DBTYPE_CLUSTER_RES: return "Clustering";
case Parameters::DBTYPE_PREFILTER_RES: return "Prefilter";
case Parameters::DBTYPE_TAXONOMICAL_RESULT: return "Taxonomy";
case Parameters::DBTYPE_INDEX_DB: return "Index";
case Parameters::DBTYPE_CA3M_DB: return "CA3M";
case Parameters::DBTYPE_MSA_DB: return "MSA";
case Parameters::DBTYPE_GENERIC_DB: return "Generic";
default: return "Unknown";
}
}

0 comments on commit ff2085a

Please sign in to comment.