#!/bin/sh -e

pkg=kraken

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cd $AUTOPKGTEST_TMP

cp -a /usr/share/doc/${pkg}/test_data/* .
gunzip -r *

kraken-build --add-to-library Acartia_tonsa.fasta --db test_db
kraken-build --add-to-library Acinetobacter_phage.fasta --db test_db
kraken-build --build --minimizer-len 5 --db test_db
kraken --db test_db test.fa > kraken.output
kraken-report --db test_db kraken.output

