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 $SINA_EXTRA_PARAMS" |
---|
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 internal" |
---|
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 | begin_test "realign msc 0.9" |
---|
70 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-msc-max 0.9" |
---|
71 | assert_exit_success |
---|
72 | assert_output_contains "align 48 sequences" |
---|
73 | assert_output_value avg_sps: ">0.99" |
---|
74 | assert_output_value avg_cpm: "<0.001" |
---|
75 | assert_output_value avg_idty: ">0.88" "<0.9" |
---|
76 | end_test |
---|
77 | |
---|
78 | begin_test "realign msc 0.8" |
---|
79 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-msc-max 0.8" |
---|
80 | assert_exit_success |
---|
81 | assert_output_contains "align 48 sequences" |
---|
82 | assert_output_value avg_sps: ">0.97" |
---|
83 | assert_output_value avg_cpm: "<0.002" |
---|
84 | assert_output_value avg_idty: ">0.78" "<0.8" |
---|
85 | end_test |
---|
86 | |
---|
87 | begin_test "realign msc 0.7" |
---|
88 | capture_stdouterr "$SINA --select-step 250 --realign --fs-leave-query-out --fs-msc-max 0.7" |
---|
89 | assert_exit_success |
---|
90 | assert_output_contains "align 48 sequences" |
---|
91 | assert_output_value avg_sps: ">0.95" |
---|
92 | assert_output_value avg_cpm: "<0.01" |
---|
93 | assert_output_value avg_idty: ">0.68" "<0.7" |
---|
94 | end_test |
---|
95 | |
---|
96 | |
---|
97 | |
---|