File: installation-test

package info (click to toggle)
reprof 1.0.1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 43,116 kB
  • sloc: perl: 867; sh: 484; makefile: 58
file content (46 lines) | stat: -rw-r--r-- 1,783 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# autopkgtest check: build and run with default test data
# This test tries to run `reprof` from `reprof` package. 
# Package `librg-reprof-bundle-perl` is tested with `autopkgtest-pkg-perl`
# explicitly.
# Author: Tatiana Malygina <merlettaia@gmail.com>

set -e

pkg=reprof

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}/examples/* .
find . -type f -name "*.gz" -exec gunzip \{\} \;
for lnk in `find . -type l -name "*.gz"` ; do
    ln -s `basename $(readlink $lnk) .gz` `echo $lnk | sed 's/\.gz$//'`
    rm $lnk
done

echo "Run reprof for prediction from BLAST PSSM matrix..."
# Following examples were taken from man page.
# Prediction from BLAST PSSM matrix for best results:
reprof -i example.Q -o example.Q.new.reprof
[ -z $(cmp -s example.Q.new.reprof example.Q.reprof) ]

echo "Run reprof for prediction from .fasta..."
# Prediction from FASTA file:
reprof -i example.fasta -o example.fasta.new.reprof
[ -z $(cmp -s example.fasta.new.reprof example.fasta.reprof) ]

echo "Run reprof with --mutations parameter..."
# Prediction from BLAST PSSM matrix file using the mutation mode:
reprof -i example.Q -o mutations_example.Q.new.reprof --mutations mutations.txt
[ -z $(cmp -s mutations_example.Q.new.reprof mutations_example.Q.reprof) ]
[ -z $(cmp -s mutations_example.Q.new.reprof_F172P mutations_example.Q.reprof_F172P) ]
[ -z $(cmp -s mutations_example.Q.new.reprof_M1Q mutations_example.Q.reprof_M1Q) ]
[ -z $(cmp -s mutations_example.Q.new.reprof_N34Y mutations_example.Q.reprof_N34Y) ]
[ -z $(cmp -s mutations_example.Q.new.reprof_ORI mutations_example.Q.reprof_ORI) ]

echo "Reprof works as expected"