Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tests for New Linclust #2

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regression/run_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CLUDB="${RESULTS}/clu"

awk 'BEGIN { l = "" } l != $1 { l = $1; cnt++; } { t++; } END { print cnt"\t"t"\t"(t/cnt) }' "$RESULTS/results_cluster.tsv" > "$RESULTS/results_summary.tsv"
ACTUAL="$(cut -f1 "$RESULTS/results_summary.tsv")"
TARGET="15722"
TARGET="15710"
awk -v actual="$ACTUAL" -v target="$TARGET" \
'BEGIN { print (actual == target) ? "GOOD" : "BAD"; print "Expected: ", target; print "Actual: ", actual; }' \
> "${RESULTS}.report"
2 changes: 1 addition & 1 deletion regression/run_cluster_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CLUSTERMEMEBER=$(wc -l "$RESULTS/clu_updated.tsv" | awk '{print $1}')
CLUSTER=$(echo $(cut -f1 "$RESULTS/clu_updated.tsv" | sort -u | wc -l))
UPDATEDSEQCNT=$(wc -l "$RESULTS/seqdb_update.index" | awk '{print $1}')

TARGET="32132 24753 32132"
TARGET="32132 24742 32132"
ACTUAL="$CLUSTERMEMEBER $CLUSTER $UPDATEDSEQCNT"
awk -v actual="$ACTUAL" -v target="$TARGET" 'BEGIN { print (actual == target) ? "GOOD" : "BAD"; \
print "Expected: ", target; \
Expand Down
2 changes: 1 addition & 1 deletion regression/run_easy_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

awk 'BEGIN { l = "" } l != $1 { l = $1; cnt++; } { t++; } END { print cnt"\t"t"\t"(t/cnt) }' "$RESULTS/results_cluster.tsv" > "$RESULTS/results_summary.tsv"
ACTUAL="$(cut -f1 "$RESULTS/results_summary.tsv")"
TARGET="15722"
TARGET="15710"
awk -v actual="$ACTUAL" -v target="$TARGET" \
'BEGIN { print (actual == target) ? "GOOD" : "BAD"; print "Expected: ", target; print "Actual: ", actual; }' \
> "${RESULTS}.report"
2 changes: 1 addition & 1 deletion regression/run_easy_cluster_reassign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cat "${DATADIR}/clu.fasta" | "${MMSEQS}" easy-cluster stdin "$RESULTS/results"

awk 'BEGIN { l = "" } l != $1 { l = $1; cnt++; } { t++; } END { print cnt"\t"t"\t"(t/cnt) }' "$RESULTS/results_cluster.tsv" > "$RESULTS/results_summary.tsv"
ACTUAL="$(cut -f1 "$RESULTS/results_summary.tsv")"
TARGET="17257"
TARGET="17248"
awk -v actual="$ACTUAL" -v target="$TARGET" \
'BEGIN { print (actual == target) ? "GOOD" : "BAD"; print "Expected: ", target; print "Actual: ", actual; }' \
> "${RESULTS}.report"
2 changes: 1 addition & 1 deletion regression/run_easy_linclust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

awk 'BEGIN { l = "" } l != $1 { l = $1; cnt++; } { t++; } END { print cnt"\t"t"\t"(t/cnt) }' "$RESULTS/results_cluster.tsv" > "$RESULTS/results_summary.tsv"
ACTUAL="$(cut -f1 "$RESULTS/results_summary.tsv")"
TARGET="26493"
TARGET="26146"
awk -v actual="$ACTUAL" -v target="$TARGET" \
'BEGIN { print (actual == target) ? "GOOD" : "BAD"; print "Expected: ", target; print "Actual: ", actual; }' \
> "${RESULTS}.report"
2 changes: 1 addition & 1 deletion regression/run_linclust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CLUDB=

awk 'BEGIN { l = "" } l != $1 { l = $1; cnt++; } { t++; } END { print cnt"\t"t"\t"(t/cnt) }' "$RESULTS/results_cluster.tsv" > "$RESULTS/results_summary.tsv"
ACTUAL="$(cut -f1 "$RESULTS/results_summary.tsv")"
TARGET="26491"
TARGET="26135"
awk -v actual="$ACTUAL" -v target="$TARGET" \
'BEGIN { print (actual == target) ? "GOOD" : "BAD"; print "Expected: ", target; print "Actual: ", actual; }' \
> "${RESULTS}.report"
13 changes: 13 additions & 0 deletions regression/run_linclust_adjacent_disabled.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh -e
CLUDB=
"${MMSEQS}" createdb "${DATADIR}/clu.fasta" "${RESULTS}/clu"

"${MMSEQS}" linclust "${RESULTS}/clu" "$RESULTS/results_clu" "$RESULTS/tmp" --cov-mode 1 --cluster-mode 0 -c 0.90 --min-seq-id 0.50 --match-adjacent-seq false
"${MMSEQS}" createtsv "${RESULTS}/clu" "${RESULTS}/clu" "$RESULTS/results_clu" "$RESULTS/results_cluster.tsv"

awk 'BEGIN { l = "" } l != $1 { l = $1; cnt++; } { t++; } END { print cnt"\t"t"\t"(t/cnt) }' "$RESULTS/results_cluster.tsv" > "$RESULTS/results_summary.tsv"
ACTUAL="$(cut -f1 "$RESULTS/results_summary.tsv")"
TARGET="26491"
awk -v actual="$ACTUAL" -v target="$TARGET" \
'BEGIN { print (actual == target) ? "GOOD" : "BAD"; print "Expected: ", target; print "Actual: ", actual; }' \
> "${RESULTS}.report"
2 changes: 1 addition & 1 deletion regression/run_linclust_split.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

awk 'BEGIN { l = "" } l != $1 { l = $1; cnt++; } { t++; } END { print cnt"\t"t"\t"(t/cnt) }' "$RESULTS/results_cluster.tsv" > "$RESULTS/results_summary.tsv"
ACTUAL="$(cut -f1 "$RESULTS/results_summary.tsv")"
TARGET="26491"
TARGET="26135"
awk -v actual="$ACTUAL" -v target="$TARGET" \
'BEGIN { print (actual == target) ? "GOOD" : "BAD"; print "Expected: ", target; print "Actual: ", actual; }' \
> "${RESULTS}.report"
1 change: 1 addition & 0 deletions run_regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ run_test EASY_CLUSTER "run_easy_cluster.sh"
run_test EASY_NUCL_CLUSTER "run_easy_nuclcluster.sh"
run_test CLUSTER_REASSIGN "run_easy_cluster_reassign.sh"
run_test LINCLUST "run_linclust.sh"
run_test LINCLUST_ADJACENT_DISABLED "run_linclust_adjacent_disabled.sh"
run_test LINCLUST_SPLIT "run_linclust_split.sh"
run_test EASY_LINCLUST "run_easy_linclust.sh"
run_test CLUSTHASH "run_clusthash.sh"
Expand Down