1 | #!/bin/bash |
---|
2 | source tests/test_helper.sh |
---|
3 | |
---|
4 | TEST_ARB=$TEST_ARGS |
---|
5 | maketmpdir T |
---|
6 | |
---|
7 | cp $TEST_ARB $T/ref.arb |
---|
8 | |
---|
9 | SINA="./src/sina" |
---|
10 | |
---|
11 | SINA="$SINA -i $T/ref.arb --db $T/ref.arb --orig-db $T/ref.arb -o /dev/null --show-dist" |
---|
12 | SINA="$SINA --threads 10 --fs-engine pt-server" |
---|
13 | |
---|
14 | begin_test "prealigned" |
---|
15 | capture_stdouterr "$SINA --select-step 250 --prealigned" |
---|
16 | assert_exit_success |
---|
17 | assert_output_contains "align 48 sequences" |
---|
18 | assert_output_contains "avg_sps: 1" |
---|
19 | assert_output_contains "avg_cpm: 0" |
---|
20 | assert_output_contains "avg_idty: 0" |
---|
21 | end_test |
---|
22 | |
---|
23 | |
---|
24 | begin_test "align copy" |
---|
25 | capture_stdouterr "$SINA --select-step 1000" |
---|
26 | assert_exit_success |
---|
27 | assert_output_contains "align 12 sequences" |
---|
28 | assert_output_contains "avg_sps: 1" |
---|
29 | assert_output_contains "avg_cpm: 0" |
---|
30 | assert_output_contains "avg_idty: 1" |
---|
31 | end_test |
---|
32 | |
---|
33 | begin_test "realign" |
---|
34 | capture_stdouterr "$SINA --select-step 250 --realign" |
---|
35 | assert_exit_success |
---|
36 | assert_output_contains "align 48 sequences" |
---|
37 | assert_output_value avg_sps: ">0.996" |
---|
38 | assert_output_value avg_cpm: "<0.0002" |
---|
39 | assert_output_value avg_idty: ">0.96" |
---|
40 | end_test |
---|
41 | |
---|
42 | begin_test "realign/noquery" |
---|
43 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out" |
---|
44 | assert_exit_success |
---|
45 | assert_output_contains "align 48 sequences" |
---|
46 | assert_output_value avg_sps: ">0.996" |
---|
47 | assert_output_value avg_cpm: "<0.00025" |
---|
48 | assert_output_value avg_idty: ">0.96" |
---|
49 | end_test |
---|
50 | |
---|
51 | begin_test "realign/noquery k=8" |
---|
52 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-kmer-len 8" |
---|
53 | assert_exit_success |
---|
54 | assert_output_contains "align 48 sequences" |
---|
55 | assert_output_value avg_sps: ">0.996" |
---|
56 | assert_output_value avg_cpm: "<0.0002" |
---|
57 | assert_output_value avg_idty: ">0.96" |
---|
58 | end_test |
---|
59 | |
---|
60 | begin_test "realign/noquery nofast" |
---|
61 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-kmer-no-fast" |
---|
62 | assert_exit_success |
---|
63 | assert_output_contains "align 48 sequences" |
---|
64 | assert_output_value avg_sps: ">0.996" |
---|
65 | assert_output_value avg_cpm: "<0.00015" |
---|
66 | assert_output_value avg_idty: ">0.96" |
---|
67 | end_test |
---|
68 | |
---|
69 | |
---|
70 | begin_test "realign msc 0.9" |
---|
71 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-msc-max 0.9" |
---|
72 | assert_exit_success |
---|
73 | assert_output_contains "align 48 sequences" |
---|
74 | assert_output_value avg_sps: ">0.99" |
---|
75 | assert_output_value avg_cpm: "<0.001" |
---|
76 | assert_output_value avg_idty: ">0.88" "<0.9" |
---|
77 | end_test |
---|
78 | |
---|
79 | begin_test "realign msc 0.8" |
---|
80 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-msc-max 0.8" |
---|
81 | assert_exit_success |
---|
82 | assert_output_contains "align 48 sequences" |
---|
83 | assert_output_value avg_sps: ">0.97" |
---|
84 | assert_output_value avg_cpm: "<0.002" |
---|
85 | assert_output_value avg_idty: ">0.78" "<0.8" |
---|
86 | end_test |
---|
87 | |
---|
88 | begin_test "realign msc 0.7" |
---|
89 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-msc-max 0.7" |
---|
90 | assert_exit_success |
---|
91 | assert_output_contains "align 48 sequences" |
---|
92 | assert_output_value avg_sps: ">0.95" |
---|
93 | assert_output_value avg_cpm: "<0.01" |
---|
94 | assert_output_value avg_idty: ">0.68" "<0.7" |
---|
95 | end_test |
---|