test.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash -e
  2. rm -f single* search_* blits_*
  3. if $(command -v "ffindex_apply_mpi" >/dev/null 2>&1); then
  4. MPI=1
  5. else
  6. unset MPI
  7. fi
  8. hhalign -i query.a3m -t query.a3m
  9. ffindex_build -s single.ffdata single.ffindex query.a3m
  10. APPLY="ffindex_apply"
  11. if [ -n "$MPI" ]; then
  12. APPLY="mpirun -np 2 ffindex_apply_mpi"
  13. fi
  14. $APPLY single.ffdata single.ffindex -d single_a3m_cons.ffdata -i single_a3m_cons.ffindex \
  15. -- hhconsensus -i stdin -oa3m stdout -M a3m -v 0
  16. $APPLY single_a3m_cons.ffdata single_a3m_cons.ffindex -d single_a3m.ffdata -i single_a3m.ffindex \
  17. -- hhfilter -i stdin -o stdout -diff 1000 -v 0
  18. $APPLY single_a3m.ffdata single_a3m.ffindex -d single_hhm.ffdata -i single_hhm.ffindex \
  19. -- hhmake -i stdin -o stdout -v 0
  20. if [ -n "$MPI" ]; then
  21. mpirun -np 2 cstranslate_mpi -i single -o single_cs219 -b -x 0.3 -c 4 -I a3m
  22. else
  23. cstranslate -i single -o single_cs219 -b -x 0.3 -c 4 -I a3m -f
  24. fi
  25. hhblits -i query.a3m -d single -blasttab blits_app_res -n 1
  26. hhblits_omp -i single -d single -blasttab blits_omp_res -n 1
  27. diff <(tr -d '\000' < blits_omp_res.ffdata) blits_app_res
  28. if [ -n "$MPI" ]; then
  29. mpirun -np 2 hhblits_mpi -i single -d single -blasttab blits_mpi_res -n 1
  30. diff <(tr -d '\000' < blits_mpi_res.ffdata) blits_app_res
  31. fi
  32. hhsearch -i query.a3m -d single -blasttab search_app_res
  33. hhsearch_omp -i single -d single -blasttab search_omp_res
  34. diff <(tr -d '\000' < search_omp_res.ffdata) search_app_res
  35. if [ -n "$MPI" ]; then
  36. mpirun -np 2 hhsearch_mpi -i single -d single -blasttab search_mpi_res
  37. diff <(tr -d '\000' < search_mpi_res.ffdata) search_app_res
  38. fi
  39. diff <(cut -f 1-10,12 blits_app_res) <(cut -f 1-10,12 search_app_res)