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
|
#!/bin/sh
# autopkgtest check: Run sumaclust on two different chains with a threshold of
# 0.97, and then do a second run based on the output of the first one.
# Check that the chains are the same in the two output files, which is a kind
# of idempotency test.
# (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 > inputTwoDifferent.fasta
>SEQ_TEST1
CCAGATCTAGCTAGCTAGCTACAGCATCGACATCAGCACTCAGCACTCAG
>SEQ_TEST2
CCAGATGATCTAGCTAGCTAGCTACAGCATTTGAACATCAGCACTGGATCAG
EOF
sumaclust -t 0.97 inputTwoDifferent.fasta > outputTwoDifferent.fasta 2>&1
sumaclust -t 0.97 outputTwoDifferent.fasta > outputTwoDifferent2.fasta 2>&1
sed -n -e '2p;4p' outputTwoDifferent.fasta > extract
sed -n -e '2p;4p' outputTwoDifferent2.fasta > extract2
diff extract extract2
if [ $? -ne 0 ]; then
exit 1
fi
|