| 1 |
#!/bin/bash |
| 2 |
set -e |
| 3 |
|
| 4 |
pkg=harvest-tools |
| 5 |
CUR_DIR=`pwd` |
| 6 |
|
| 7 |
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then |
| 8 |
AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) |
| 9 |
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM |
| 10 |
fi |
| 11 |
|
| 12 |
cp ${CUR_DIR}/test/* -a "${AUTOPKGTEST_TMP}" |
| 13 |
|
| 14 |
cd "${AUTOPKGTEST_TMP}" |
| 15 |
gunzip -r * |
| 16 |
|
| 17 |
echo 'Test 1' |
| 18 |
echo 'convert to .ggr file' |
| 19 |
harvesttools -x test2.xmfa -f test2.fna -g test2.vcf -n test2.tree |
| 20 |
harvesttools -g test2.vcf -f test2.fna -x test2.xmfa -o test2.ggr |
| 21 |
[ -s test2.tree ] || exit 1 |
| 22 |
[ -s test2.ggr ] || exit 1 |
| 23 |
echo 'PASS' |
| 24 |
echo |
| 25 |
|
| 26 |
echo 'Test 2' |
| 27 |
echo 'Recover into fna format' |
| 28 |
harvesttools -i test2.ggr -F out.fna |
| 29 |
diff -u test2.fna out.fna |
| 30 |
echo 'PASS' |
| 31 |
echo '============================================================' |
| 32 |
|