#!/bin/sh -e

pkg="atac"

if [ "$AUTOPKGTEST_TMP" = "" ]; then
    AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
    trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi
ORIGDIR=`pwd`
cd $AUTOPKGTEST_TMP
if [ -e /usr/share/doc/kmer-examples/test_data.tar.gz ] ; then
    TARFILE=/usr/share/doc/kmer-examples/test_data.tar.gz
else
    if [ -e ${ORIGDIR}/debian/tests/test-data/test_data.tar.gz ] ; then
        TARFILE=${ORIGDIR}/debian/tests/test-data/test_data.tar.gz
    else
        echo "Please install package kmer-examples to run this script"
        exit 1
    fi
fi
tar -xaf $TARFILE

# Run atac:
atac -meryldir meryldir -dir results -id1 Lepr -seq1 GCF_000195855.1_ASM19585v1_genomic.fna \
	-id2 Tuber -seq2 GCF_000195955.2_ASM19595v2_genomic.fna

echo "RESULTS: OK\n"
