#!/bin/bash
set -e

pkg=pscan-tfbs

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

cp /usr/share/doc/${pkg}/examples/* -a "${AUTOPKGTEST_TMP}"

cd "${AUTOPKGTEST_TMP}"
gunzip -r *

echo 'Test 1'
pscan-tfbs -p sample.fasta -l example_matrix_file.wil
cat sample.short_matrix
echo 'PASS'

echo 'Test 2'
pscan-tfbs -p sample.fasta -l example_matrix_file.wil -N NFY
cat sample.short_matrix
echo 'PASS'

