| 1 | #!/bin/bash |
| 2 | set -e |
| 3 | |
| 4 | pkg=poretools |
| 5 | |
| 6 | if [ "${AUTOPKGTEST_TMP}" = "" ] ; then |
| 7 | AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) |
| 8 | trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM |
| 9 | fi |
| 10 | |
| 11 | cp /usr/share/${pkg}/data -a "${AUTOPKGTEST_TMP}" |
| 12 | |
| 13 | cd "${AUTOPKGTEST_TMP}" |
| 14 | gunzip -r * |
| 15 | |
| 16 | mv data test_data |
| 17 | echo 'Test 1' |
| 18 | echo 'poretools fastq --min-length 5000 test_data/' |
| 19 | poretools fastq --min-length 5000 test_data/ |
| 20 | echo 'PASS' |
| 21 | echo |
| 22 | |
| 23 | echo 'Test 2' |
| 24 | echo 'poretools yield_plot \ |
| 25 | --plot-type basepairs \ |
| 26 | --saveas foo.pdf \ |
| 27 | test_data/' |
| 28 | |
| 29 | poretools yield_plot \ |
| 30 | --plot-type basepairs \ |
| 31 | --saveas foo.pdf \ |
| 32 | test_data/ |
| 33 | |
| 34 | echo 'poretools yield_plot \ |
| 35 | --plot-type basepairs \ |
| 36 | --saveas foo.png \ |
| 37 | --theme-bw \' |
| 38 | |
| 39 | poretools yield_plot \ |
| 40 | --plot-type basepairs \ |
| 41 | --saveas foo.png \ |
| 42 | --theme-bw \ |
| 43 | test_data/ |
| 44 | echo 'PASS' |
| 45 | echo |
| 46 | |
| 47 | echo 'Test 3' |
| 48 | echo 'poretools winner test_data/' |
| 49 | poretools winner test_data/ |
| 50 | |
| 51 | echo 'poretools winner --type all test_data/' |
| 52 | poretools winner --type all test_data/ |
| 53 | |
| 54 | echo 'poretools winner --type 2D test_data/' |
| 55 | poretools winner --type 2D test_data/ |
| 56 | |
| 57 | echo 'poretools winner --type fwd,rev test_data/' |
| 58 | poretools winner --type fwd,rev test_data/ |
| 59 | |
| 60 | echo 'poretools winner --type best test_data/' |
| 61 | poretools winner --type best test_data/ |
| 62 | echo 'PASS' |
| 63 | echo |
| 64 | |
| 65 | echo 'Test 4' |
| 66 | echo 'poretools stats test_data/' |
| 67 | poretools stats test_data/ |
| 68 | echo 'PASS' |
| 69 | echo |
| 70 | |
| 71 | echo 'Test 5' |
| 72 | echo 'poretools hist --num-bins 20 --max-length 10000 test_data/ --saveas pdf' |
| 73 | poretools hist --num-bins 20 --max-length 10000 test_data/ --saveas pdf |
| 74 | echo 'PASS' |
| 75 | echo |
| 76 | |
| 77 | echo 'Test 6' |
| 78 | echo 'poretools nucdist test_data/' |
| 79 | poretools nucdist test_data/ |
| 80 | echo 'PASS' |
| 81 | echo |
| 82 | |
| 83 | echo 'Test 7' |
| 84 | echo 'poretools qualdist test_data/' |
| 85 | poretools qualdist test_data/ |
| 86 | echo 'PASS' |
| 87 | echo |
| 88 | |
| 89 | echo 'Test 8' |
| 90 | echo 'poretools qualpos test_data/' |
| 91 | poretools qualpos test_data/ |
| 92 | echo 'PASS' |
| 93 | echo |
| 94 | |
| 95 | echo 'Test 9' |
| 96 | echo 'poretools tabular test_data/2016_3_4_3507_1_ch120_read418_strand.fast5' |
| 97 | poretools tabular test_data/2016_3_4_3507_1_ch120_read418_strand.fast5 |
| 98 | echo 'PASS' |
| 99 | echo |
| 100 | |
| 101 | echo 'Test 10' |
| 102 | echo 'poretools events test_data/ | head -5' |
| 103 | poretools events test_data/ | head -5 |
| 104 | echo 'PASS' |
| 105 | echo |
| 106 | |
| 107 | echo 'Test 11' |
| 108 | echo 'poretools events --pre-basecalled test_data/ | head -5' |
| 109 | poretools events --pre-basecalled test_data/ | head -5 |
| 110 | echo 'PASS' |
| 111 | echo |
| 112 | |
| 113 | echo 'Test 12' |
| 114 | echo 'poretools times test_data/' |
| 115 | poretools times test_data/ |
| 116 | echo 'PASS' |
| 117 | echo |
| 118 | |
| 119 | echo 'Test 13' |
| 120 | echo 'poretools index test_data | head -5' |
| 121 | poretools index test_data | head -5 |
| 122 | echo 'PASS' |
| 123 | echo |