initial commit
[jalview.git] / forester / archive / RIO / others / hmmer / testsuite / Optiontests.pl
1 #! /usr/local/bin/perl
2
3 @tests = (
4           "hmmbuild --informat selex -F Optiontests.hmm  Optiontests.slx",   # Make a protein HMM
5           "hmmbuild --informat selex -F Optiontests.nhmm Optiontests.nslx",  # Make a DNA HMM
6           "hmmalign -h", 
7           "hmmalign Optiontests.hmm Optiontests.fa",
8           "hmmalign -m Optiontests.hmm Optiontests.fa",
9           "hmmalign -o tmp Optiontests.hmm Optiontests.fa",
10           "hmmalign -q Optiontests.hmm Optiontests.fa",
11           "hmmalign --withali Optiontests.slx Optiontests.hmm Optiontests.fa",
12           "hmmalign --mapali Optiontests.slx Optiontests.hmm Optiontests.fa",
13           "hmmbuild -h",
14           "hmmbuild --informat selex tmp.hmm Optiontests.slx",
15           "hmmbuild --informat selex -F tmp.hmm Optiontests.slx",            # Need -F to force 
16           "hmmbuild --informat selex -n foo -F tmp.hmm Optiontests.slx",
17           "hmmbuild --informat selex -o tmp -F tmp.hmm Optiontests.slx",
18           "hmmbuild --informat selex -A tmp.hmm Optiontests.slx",
19           "hmmbuild --informat selex -f -F tmp.hmm Optiontests.slx",
20           "hmmbuild --informat selex -g -F tmp.hmm Optiontests.slx",
21           "hmmbuild --informat selex -s -F tmp.hmm Optiontests.slx",
22           "hmmbuild --informat selex --fast -F tmp.hmm Optiontests.slx",
23           "hmmbuild --informat selex --hand -F tmp.hmm Optiontests.slx",
24           "hmmbuild --informat selex --null ../tutorial/amino.null -F tmp.hmm Optiontests.slx",
25           "hmmbuild --informat selex --pam   Optiontests.pam -F tmp.hmm Optiontests.slx",
26           "hmmbuild --informat selex --prior ../tutorial/amino.pri -F tmp.hmm Optiontests.slx",
27           "hmmbuild --informat selex --wblosum -F tmp.hmm Optiontests.slx",
28           "hmmbuild --informat selex --wgsc -F tmp.hmm Optiontests.slx",
29           "hmmbuild --informat selex --wme -F tmp.hmm Optiontests.slx",
30           "hmmbuild --informat selex --wvoronoi -F tmp.hmm Optiontests.slx",
31           "hmmbuild --informat selex --wnone -F tmp.hmm Optiontests.slx",
32           "hmmbuild --informat selex --noeff -F tmp.hmm Optiontests.slx",
33           "hmmbuild --informat selex --amino -F tmp.hmm Optiontests.slx",
34           "hmmbuild --informat selex --nucleic -F tmp.hmm Optiontests.nslx",
35           "hmmbuild --informat selex --archpri 0.9 -F tmp.hmm Optiontests.slx",
36           "hmmbuild --informat selex --binary -F tmp.hmm Optiontests.slx",
37           "hmmbuild --informat selex --cfile tmp -F tmp.hmm Optiontests.slx",
38           "hmmbuild --informat selex --gapmax 0.6 --fast -F tmp.hmm Optiontests.slx",
39           "hmmbuild --informat selex --idlevel 0.5 -F tmp.hmm Optiontests.slx",
40           "hmmbuild --informat selex --pamwgt 10 --pam Optiontests.pam -F tmp.hmm Optiontests.slx",
41           "hmmbuild --informat selex --swentry 0.3 -F -s tmp.hmm Optiontests.slx",
42           "hmmbuild --informat selex --swexit 0.3 -F -s tmp.hmm Optiontests.slx",
43           "hmmbuild --informat selex --verbose -F tmp.hmm Optiontests.slx",
44           "hmmcalibrate -h",
45           "hmmcalibrate Optiontests.hmm",
46           "hmmcalibrate --fixed 15 Optiontests.hmm",
47           "hmmcalibrate --mean  25 Optiontests.hmm",
48           "hmmcalibrate --histfile tmp --fixed 15 Optiontests.hmm",
49           "hmmcalibrate --num 4500 --fixed 15 Optiontests.hmm",
50           "hmmcalibrate --sd 50 --mean  25   Optiontests.hmm",
51           "hmmcalibrate --seed 666 --fixed 15 Optiontests.hmm",
52           "hmmconvert -h",
53           "hmmconvert Optiontests.hmm tmp2.hmm",
54           "hmmconvert -F Optiontests.hmm tmp2.hmm",
55           "hmmconvert -a -F Optiontests.hmm tmp2.hmm",
56           "hmmconvert -A Optiontests.hmm tmp2.hmm",     # order sensitive. tmp2.hmm must be HMM
57           "hmmconvert -b -F Optiontests.hmm tmp2.hmm",
58           "hmmconvert -p -F Optiontests.hmm tmp2.hmm",
59           "hmmconvert -P -F Optiontests.hmm tmp2.hmm",
60           "hmmemit -h",
61           "hmmemit Optiontests.hmm",
62           "hmmemit -a Optiontests.hmm",
63           "hmmemit -n 6 Optiontests.hmm",
64           "hmmemit -o tmp Optiontests.hmm",
65           "hmmemit -q Optiontests.hmm",
66           "hmmemit --seed 666 Optiontests.hmm",
67           "hmmindex -h",
68           "hmmindex Optiontests.hmm",
69           "hmmfetch -h",
70           "hmmfetch Optiontests.hmm Optiontests",
71           "hmmpfam -h",
72           "hmmpfam -n Optiontests.nhmm Optiontests.nfa",
73           "hmmpfam -A 0 Optiontests.hmm Optiontests.fa",
74           "hmmpfam -E 1 Optiontests.hmm Optiontests.fa",
75           "hmmpfam -T 1 Optiontests.hmm Optiontests.fa",
76           "hmmpfam -Z 10 Optiontests.hmm Optiontests.fa",
77           "hmmpfam --domE 1 Optiontests.hmm Optiontests.fa",
78           "hmmpfam --domT 1 Optiontests.hmm Optiontests.fa",
79           "hmmpfam --forward Optiontests.hmm Optiontests.fa",
80           "hmmpfam --null2 Optiontests.hmm Optiontests.fa",
81           "hmmpfam --xnu Optiontests.hmm Optiontests.fa",
82           "hmmsearch -h",
83           "hmmsearch -A 0 Optiontests.hmm Optiontests.fa",
84           "hmmsearch -E 1 Optiontests.hmm Optiontests.fa",
85           "hmmsearch -T 1 Optiontests.hmm Optiontests.fa",
86           "hmmsearch -Z 10 Optiontests.hmm Optiontests.fa",
87           "hmmsearch --domE 1 Optiontests.hmm Optiontests.fa",
88           "hmmsearch --domT 1 Optiontests.hmm Optiontests.fa",
89           "hmmsearch --forward Optiontests.hmm Optiontests.fa",
90           "hmmsearch --null2 Optiontests.hmm Optiontests.fa",
91           "hmmsearch --xnu Optiontests.hmm Optiontests.fa",
92           );
93
94
95 unlink "tmp.hmm";
96 while ($testline = shift(@tests))
97 {
98     $status = system("../binaries/$testline 2>&1 > tmp.out");
99     if ($status > 0) {
100         print "failure: $testline\n";
101         $failed++;
102     }
103     $total++;
104 }
105
106 $passed = $total - $failed;
107 printf "Option tests: %d. Passed: %d. Failed: %d\n", $total, $passed, $failed;
108
109 unlink "tmp";
110 unlink "tmp.out";
111 unlink "tmp.hmm";
112 unlink "tmp2.hmm";
113 unlink "Optiontests.hmm";
114 unlink "Optiontests.nhmm";
115 unlink "Optiontests.hmm.ssi";
116