1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/bin/sh
# autopkgtest check: Run sumatra on two identical files with three sequences
# in each. We use a threshold of 1 and check that
# * 3 sequences are read in each one;
# * 5 lines are output with a score of 1.
# (C) 2020 Pierre Gruet.
# Author: Pierre Gruet <pgt@debian.org>
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > input.fasta
>SEQ1
ATGTGATCAATGCTGCTAGCTGCTAGCTGCTACGCACACGTGCATCGCTGCATGCACTGCTGCTGATGCTCAGCTAG
>SEQ2
AGGTATCTCGATCGATCACTCGCATCGTGTGCTAGCTGCTAGCTGCTACGATCGCATCGC
>SEQ3
AGGTATCTCGATCGATCACTCGCATCGTGTGCTAGCTGCTAGCTGCTACGATCGCATCGC
EOF
sumatra -t 1. input.fasta input.fasta 2>&1 | \
sed -n 's/^3.sequences//p' | \
wc -l |
grep -q "2"
if [ $? -ne 0 ]; then
exit 1
fi
sumatra -t 1. input.fasta input.fasta 2>&1 | \
sed -n 's/^SEQ.*SEQ.*1.00//p' | \
wc -l |
grep -q "5"
if [ $? -ne 0 ]; then
exit 1
fi
|