File: clusterThreeInputs

package info (click to toggle)
sumaclust 1.0.36%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 452 kB
  • sloc: ansic: 2,191; sh: 111; makefile: 100
file content (29 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
# autopkgtest check: Run sumaclust on three different chains with a threshold 
# of 0.97 to check that only two clusters are created.
# (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 > inputThreeDifferent.fasta
>SEQ_TEST1
CCAGATCTAGCTAGCTAGCTACAGCATCGACATCAGCACTCAGCACTCAG
>SEQ_TEST2
TCAGATCTAGCTAGCTAGCTACAGCATCGACATCAGCACTCAGCACTCAG
>SEQ_TEST3
TTTCAGATCTAGCAAGCGAGCTGACTTACAGCATCGACATCAGCACTCAGCACTCAGTGAT
EOF

sumaclust -t 0.97 inputThreeDifferent.fasta 2>&1 | \
  sed -n '/clusters/ s/.*Done : 100 \% *//p' | \
  sed -n 's/ clusters.*//p' | \
  grep -q "2"

if [ $? -ne 0 ]; then
  exit 1
fi