BioDSL 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/BioDSL.gemspec +64 -0
  4. data/LICENSE +339 -0
  5. data/README.md +205 -0
  6. data/Rakefile +94 -0
  7. data/examples/fastq_to_fasta.rb +8 -0
  8. data/lib/BioDSL/cary.rb +242 -0
  9. data/lib/BioDSL/command.rb +133 -0
  10. data/lib/BioDSL/commands/add_key.rb +110 -0
  11. data/lib/BioDSL/commands/align_seq_mothur.rb +194 -0
  12. data/lib/BioDSL/commands/analyze_residue_distribution.rb +222 -0
  13. data/lib/BioDSL/commands/assemble_pairs.rb +336 -0
  14. data/lib/BioDSL/commands/assemble_seq_idba.rb +230 -0
  15. data/lib/BioDSL/commands/assemble_seq_ray.rb +345 -0
  16. data/lib/BioDSL/commands/assemble_seq_spades.rb +252 -0
  17. data/lib/BioDSL/commands/classify_seq.rb +217 -0
  18. data/lib/BioDSL/commands/classify_seq_mothur.rb +226 -0
  19. data/lib/BioDSL/commands/clip_primer.rb +318 -0
  20. data/lib/BioDSL/commands/cluster_otus.rb +181 -0
  21. data/lib/BioDSL/commands/collapse_otus.rb +170 -0
  22. data/lib/BioDSL/commands/collect_otus.rb +150 -0
  23. data/lib/BioDSL/commands/complement_seq.rb +117 -0
  24. data/lib/BioDSL/commands/count.rb +135 -0
  25. data/lib/BioDSL/commands/count_values.rb +149 -0
  26. data/lib/BioDSL/commands/degap_seq.rb +253 -0
  27. data/lib/BioDSL/commands/dereplicate_seq.rb +168 -0
  28. data/lib/BioDSL/commands/dump.rb +157 -0
  29. data/lib/BioDSL/commands/filter_rrna.rb +239 -0
  30. data/lib/BioDSL/commands/genecall.rb +237 -0
  31. data/lib/BioDSL/commands/grab.rb +535 -0
  32. data/lib/BioDSL/commands/index_taxonomy.rb +226 -0
  33. data/lib/BioDSL/commands/mask_seq.rb +175 -0
  34. data/lib/BioDSL/commands/mean_scores.rb +168 -0
  35. data/lib/BioDSL/commands/merge_pair_seq.rb +175 -0
  36. data/lib/BioDSL/commands/merge_table.rb +225 -0
  37. data/lib/BioDSL/commands/merge_values.rb +113 -0
  38. data/lib/BioDSL/commands/plot_heatmap.rb +233 -0
  39. data/lib/BioDSL/commands/plot_histogram.rb +306 -0
  40. data/lib/BioDSL/commands/plot_matches.rb +282 -0
  41. data/lib/BioDSL/commands/plot_residue_distribution.rb +278 -0
  42. data/lib/BioDSL/commands/plot_scores.rb +285 -0
  43. data/lib/BioDSL/commands/random.rb +153 -0
  44. data/lib/BioDSL/commands/read_fasta.rb +222 -0
  45. data/lib/BioDSL/commands/read_fastq.rb +414 -0
  46. data/lib/BioDSL/commands/read_table.rb +329 -0
  47. data/lib/BioDSL/commands/reverse_seq.rb +113 -0
  48. data/lib/BioDSL/commands/slice_align.rb +400 -0
  49. data/lib/BioDSL/commands/slice_seq.rb +151 -0
  50. data/lib/BioDSL/commands/sort.rb +223 -0
  51. data/lib/BioDSL/commands/split_pair_seq.rb +220 -0
  52. data/lib/BioDSL/commands/split_values.rb +165 -0
  53. data/lib/BioDSL/commands/trim_primer.rb +314 -0
  54. data/lib/BioDSL/commands/trim_seq.rb +192 -0
  55. data/lib/BioDSL/commands/uchime_ref.rb +170 -0
  56. data/lib/BioDSL/commands/uclust.rb +286 -0
  57. data/lib/BioDSL/commands/unique_values.rb +145 -0
  58. data/lib/BioDSL/commands/usearch_global.rb +171 -0
  59. data/lib/BioDSL/commands/usearch_local.rb +171 -0
  60. data/lib/BioDSL/commands/write_fasta.rb +207 -0
  61. data/lib/BioDSL/commands/write_fastq.rb +191 -0
  62. data/lib/BioDSL/commands/write_table.rb +419 -0
  63. data/lib/BioDSL/commands/write_tree.rb +167 -0
  64. data/lib/BioDSL/commands.rb +31 -0
  65. data/lib/BioDSL/config.rb +55 -0
  66. data/lib/BioDSL/csv.rb +307 -0
  67. data/lib/BioDSL/debug.rb +42 -0
  68. data/lib/BioDSL/fasta.rb +133 -0
  69. data/lib/BioDSL/fastq.rb +77 -0
  70. data/lib/BioDSL/filesys.rb +137 -0
  71. data/lib/BioDSL/fork.rb +145 -0
  72. data/lib/BioDSL/hamming.rb +128 -0
  73. data/lib/BioDSL/helpers/aux_helper.rb +44 -0
  74. data/lib/BioDSL/helpers/email_helper.rb +66 -0
  75. data/lib/BioDSL/helpers/history_helper.rb +40 -0
  76. data/lib/BioDSL/helpers/log_helper.rb +55 -0
  77. data/lib/BioDSL/helpers/options_helper.rb +405 -0
  78. data/lib/BioDSL/helpers/status_helper.rb +132 -0
  79. data/lib/BioDSL/helpers.rb +35 -0
  80. data/lib/BioDSL/html_report.rb +200 -0
  81. data/lib/BioDSL/math.rb +55 -0
  82. data/lib/BioDSL/mummer.rb +216 -0
  83. data/lib/BioDSL/pipeline.rb +354 -0
  84. data/lib/BioDSL/seq/ambiguity.rb +66 -0
  85. data/lib/BioDSL/seq/assemble.rb +240 -0
  86. data/lib/BioDSL/seq/backtrack.rb +252 -0
  87. data/lib/BioDSL/seq/digest.rb +99 -0
  88. data/lib/BioDSL/seq/dynamic.rb +263 -0
  89. data/lib/BioDSL/seq/homopolymer.rb +59 -0
  90. data/lib/BioDSL/seq/kmer.rb +293 -0
  91. data/lib/BioDSL/seq/levenshtein.rb +113 -0
  92. data/lib/BioDSL/seq/translate.rb +109 -0
  93. data/lib/BioDSL/seq/trim.rb +188 -0
  94. data/lib/BioDSL/seq.rb +742 -0
  95. data/lib/BioDSL/serializer.rb +98 -0
  96. data/lib/BioDSL/stream.rb +113 -0
  97. data/lib/BioDSL/taxonomy.rb +691 -0
  98. data/lib/BioDSL/test.rb +42 -0
  99. data/lib/BioDSL/tmp_dir.rb +68 -0
  100. data/lib/BioDSL/usearch.rb +301 -0
  101. data/lib/BioDSL/verbose.rb +42 -0
  102. data/lib/BioDSL/version.rb +31 -0
  103. data/lib/BioDSL.rb +81 -0
  104. data/test/BioDSL/commands/test_add_key.rb +105 -0
  105. data/test/BioDSL/commands/test_align_seq_mothur.rb +99 -0
  106. data/test/BioDSL/commands/test_analyze_residue_distribution.rb +134 -0
  107. data/test/BioDSL/commands/test_assemble_pairs.rb +459 -0
  108. data/test/BioDSL/commands/test_assemble_seq_idba.rb +50 -0
  109. data/test/BioDSL/commands/test_assemble_seq_ray.rb +51 -0
  110. data/test/BioDSL/commands/test_assemble_seq_spades.rb +50 -0
  111. data/test/BioDSL/commands/test_classify_seq.rb +50 -0
  112. data/test/BioDSL/commands/test_classify_seq_mothur.rb +59 -0
  113. data/test/BioDSL/commands/test_clip_primer.rb +377 -0
  114. data/test/BioDSL/commands/test_cluster_otus.rb +128 -0
  115. data/test/BioDSL/commands/test_collapse_otus.rb +81 -0
  116. data/test/BioDSL/commands/test_collect_otus.rb +82 -0
  117. data/test/BioDSL/commands/test_complement_seq.rb +78 -0
  118. data/test/BioDSL/commands/test_count.rb +103 -0
  119. data/test/BioDSL/commands/test_count_values.rb +85 -0
  120. data/test/BioDSL/commands/test_degap_seq.rb +96 -0
  121. data/test/BioDSL/commands/test_dereplicate_seq.rb +92 -0
  122. data/test/BioDSL/commands/test_dump.rb +109 -0
  123. data/test/BioDSL/commands/test_filter_rrna.rb +128 -0
  124. data/test/BioDSL/commands/test_genecall.rb +50 -0
  125. data/test/BioDSL/commands/test_grab.rb +398 -0
  126. data/test/BioDSL/commands/test_index_taxonomy.rb +62 -0
  127. data/test/BioDSL/commands/test_mask_seq.rb +98 -0
  128. data/test/BioDSL/commands/test_mean_scores.rb +111 -0
  129. data/test/BioDSL/commands/test_merge_pair_seq.rb +115 -0
  130. data/test/BioDSL/commands/test_merge_table.rb +131 -0
  131. data/test/BioDSL/commands/test_merge_values.rb +83 -0
  132. data/test/BioDSL/commands/test_plot_heatmap.rb +185 -0
  133. data/test/BioDSL/commands/test_plot_histogram.rb +194 -0
  134. data/test/BioDSL/commands/test_plot_matches.rb +157 -0
  135. data/test/BioDSL/commands/test_plot_residue_distribution.rb +309 -0
  136. data/test/BioDSL/commands/test_plot_scores.rb +308 -0
  137. data/test/BioDSL/commands/test_random.rb +88 -0
  138. data/test/BioDSL/commands/test_read_fasta.rb +229 -0
  139. data/test/BioDSL/commands/test_read_fastq.rb +552 -0
  140. data/test/BioDSL/commands/test_read_table.rb +327 -0
  141. data/test/BioDSL/commands/test_reverse_seq.rb +79 -0
  142. data/test/BioDSL/commands/test_slice_align.rb +218 -0
  143. data/test/BioDSL/commands/test_slice_seq.rb +131 -0
  144. data/test/BioDSL/commands/test_sort.rb +128 -0
  145. data/test/BioDSL/commands/test_split_pair_seq.rb +164 -0
  146. data/test/BioDSL/commands/test_split_values.rb +95 -0
  147. data/test/BioDSL/commands/test_trim_primer.rb +329 -0
  148. data/test/BioDSL/commands/test_trim_seq.rb +150 -0
  149. data/test/BioDSL/commands/test_uchime_ref.rb +113 -0
  150. data/test/BioDSL/commands/test_uclust.rb +139 -0
  151. data/test/BioDSL/commands/test_unique_values.rb +98 -0
  152. data/test/BioDSL/commands/test_usearch_global.rb +123 -0
  153. data/test/BioDSL/commands/test_usearch_local.rb +125 -0
  154. data/test/BioDSL/commands/test_write_fasta.rb +159 -0
  155. data/test/BioDSL/commands/test_write_fastq.rb +166 -0
  156. data/test/BioDSL/commands/test_write_table.rb +411 -0
  157. data/test/BioDSL/commands/test_write_tree.rb +122 -0
  158. data/test/BioDSL/helpers/test_options_helper.rb +272 -0
  159. data/test/BioDSL/seq/test_assemble.rb +98 -0
  160. data/test/BioDSL/seq/test_backtrack.rb +176 -0
  161. data/test/BioDSL/seq/test_digest.rb +71 -0
  162. data/test/BioDSL/seq/test_dynamic.rb +133 -0
  163. data/test/BioDSL/seq/test_homopolymer.rb +58 -0
  164. data/test/BioDSL/seq/test_kmer.rb +134 -0
  165. data/test/BioDSL/seq/test_translate.rb +75 -0
  166. data/test/BioDSL/seq/test_trim.rb +101 -0
  167. data/test/BioDSL/test_cary.rb +176 -0
  168. data/test/BioDSL/test_command.rb +45 -0
  169. data/test/BioDSL/test_csv.rb +514 -0
  170. data/test/BioDSL/test_debug.rb +42 -0
  171. data/test/BioDSL/test_fasta.rb +154 -0
  172. data/test/BioDSL/test_fastq.rb +46 -0
  173. data/test/BioDSL/test_filesys.rb +145 -0
  174. data/test/BioDSL/test_fork.rb +85 -0
  175. data/test/BioDSL/test_math.rb +41 -0
  176. data/test/BioDSL/test_mummer.rb +79 -0
  177. data/test/BioDSL/test_pipeline.rb +187 -0
  178. data/test/BioDSL/test_seq.rb +790 -0
  179. data/test/BioDSL/test_serializer.rb +72 -0
  180. data/test/BioDSL/test_stream.rb +55 -0
  181. data/test/BioDSL/test_taxonomy.rb +336 -0
  182. data/test/BioDSL/test_test.rb +42 -0
  183. data/test/BioDSL/test_tmp_dir.rb +58 -0
  184. data/test/BioDSL/test_usearch.rb +33 -0
  185. data/test/BioDSL/test_verbose.rb +42 -0
  186. data/test/helper.rb +82 -0
  187. data/www/command.html.haml +14 -0
  188. data/www/css.html.haml +55 -0
  189. data/www/input_files.html.haml +3 -0
  190. data/www/layout.html.haml +12 -0
  191. data/www/output_files.html.haml +3 -0
  192. data/www/overview.html.haml +15 -0
  193. data/www/pipeline.html.haml +4 -0
  194. data/www/png.html.haml +2 -0
  195. data/www/status.html.haml +9 -0
  196. data/www/time.html.haml +11 -0
  197. metadata +503 -0
@@ -0,0 +1,552 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', '..')
3
+
4
+ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #
5
+ # #
6
+ # Copyright (C) 2007-2015 Martin Asser Hansen (mail@maasha.dk). #
7
+ # #
8
+ # This program is free software; you can redistribute it and/or #
9
+ # modify it under the terms of the GNU General Public License #
10
+ # as published by the Free Software Foundation; either version 2 #
11
+ # of the License, or (at your option) any later version. #
12
+ # #
13
+ # This program is distributed in the hope that it will be useful, #
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of #
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
16
+ # GNU General Public License for more details. #
17
+ # #
18
+ # You should have received a copy of the GNU General Public License #
19
+ # along with this program; if not, write to the Free Software #
20
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, #
21
+ # USA. #
22
+ # #
23
+ # http://www.gnu.org/copyleft/gpl.html #
24
+ # #
25
+ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #
26
+ # #
27
+ # This software is part of BioDSL (www.github.com/maasha/BioDSL). #
28
+ # #
29
+ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #
30
+
31
+ require 'test/helper'
32
+
33
+ # Test class for ReadFastq.
34
+ #
35
+ # rubocop: disable LineLength
36
+ # rubocop: disable ClassLength
37
+ class TestReadFastq < Test::Unit::TestCase
38
+ def setup
39
+ @tmpdir = Dir.mktmpdir('BioDSL')
40
+
41
+ setup_file1
42
+ setup_file2
43
+ setup_file3
44
+ setup_file4
45
+ setup_file5
46
+ setup_file6
47
+ setup_data
48
+
49
+ @p = BioDSL::Pipeline.new
50
+ end
51
+
52
+ def setup_file1
53
+ @file = File.join(@tmpdir, 'test.fq')
54
+
55
+ File.open(@file, 'w') do |ios|
56
+ ios.puts <<-'EOF'.gsub(/^\s+\|/, '')
57
+ |@base_33
58
+ |aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
59
+ |+
60
+ |!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
61
+ |@base_64
62
+ |bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
63
+ |+
64
+ |;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
65
+ EOF
66
+ end
67
+ end
68
+
69
+ def setup_file2
70
+ @file2 = File.join(@tmpdir, 'test2.fq')
71
+
72
+ File.open(@file2, 'w') do |ios|
73
+ ios.puts <<-EOF.gsub(/^\s+\|/, '')
74
+ |@M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14
75
+ |TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA
76
+ |+
77
+ |<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH
78
+ |@M01168:16:000000000-A1R9L:1:1101:13906:2139 1:N:0:14
79
+ |TAGGGAATCTTGCACAATGGAGGAAACTCTGATGCAGCG
80
+ |+
81
+ |<???9?BBBDBDDBDDFFFFFFHHHIFHFHHIHHFHHHH
82
+ EOF
83
+ end
84
+ end
85
+
86
+ def setup_file3
87
+ @file3 = File.join(@tmpdir, 'test3.fq')
88
+
89
+ File.open(@file3, 'w') do |ios|
90
+ ios.puts <<-EOF.gsub(/^\s+\|/, '')
91
+ |@M01168:16:000000000-A1R9L:1:1101:14862:1868 2:N:0:14
92
+ |CCTGTTTGCTACCCACGCTTTCGTACCTCAGCGTCAGTA
93
+ |+
94
+ |?????BB<-<BDDDDDFEEFFFHFFHI;F;EGHHDHEF9
95
+ |@M01168:16:000000000-A1R9L:1:1101:13906:2139 2:N:0:14
96
+ |ACTCTTCGCTACCCATGCTTTCGTTCCTCAGCGTCAGTA
97
+ |+
98
+ |,5<??BB?DDABDBDDFFFFFFHFHIHFHHIIHEHEHF?
99
+ EOF
100
+ end
101
+ end
102
+
103
+ def setup_file4
104
+ @file4 = File.join(@tmpdir, 'base64.fastq')
105
+
106
+ File.open(@file4, 'w') do |ios|
107
+ ios.puts <<-'EOF'.gsub(/^\s+\|/, '')
108
+ |@base_64
109
+ |bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
110
+ |+
111
+ |;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
112
+ EOF
113
+ end
114
+ end
115
+
116
+ def setup_file5
117
+ @file5 = File.join(@tmpdir, 'base64_2.fastq')
118
+
119
+ File.open(@file5, 'w') do |ios|
120
+ ios.puts <<-'EOF'.gsub(/^\s+\|/, '')
121
+ |@base_64_2
122
+ |bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
123
+ |+
124
+ |=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|
125
+ EOF
126
+ end
127
+ end
128
+
129
+ def setup_file6
130
+ @file6 = File.join(@tmpdir, 'inconclusive.fastq')
131
+
132
+ File.open(@file6, 'w') do |ios|
133
+ ios.puts <<-EOF.gsub(/^\s+\|/, '')
134
+ |@base_base33
135
+ |bbbbbbbbbbbbbbbb
136
+ |+
137
+ |;<=>?@ABCDEFGHIJ
138
+ EOF
139
+ end
140
+ end
141
+
142
+ def setup_data
143
+ @input, @output = BioDSL::Stream.pipe
144
+ @input2, @output2 = BioDSL::Stream.pipe
145
+
146
+ @output.write(SEQ_NAME: 'test1', SEQ: 'atgcagcac', SEQ_LEN: 9)
147
+ @output.write(SEQ_NAME: 'test2', SEQ: 'acagcactgA', SEQ_LEN: 10)
148
+ @output.close
149
+ end
150
+
151
+ def teardown
152
+ FileUtils.rm_r @tmpdir
153
+ end
154
+
155
+ test 'BioDSL::Pipeline::ReadFastq with invalid options raises' do
156
+ assert_raise(BioDSL::OptionError) { @p.read_fastq(foo: 'bar') }
157
+ end
158
+
159
+ test 'BioDSL::Pipeline::ReadFastq without required options raises' do
160
+ assert_raise(BioDSL::OptionError) { @p.read_fastq }
161
+ end
162
+
163
+ test 'BioDSL::Pipeline::ReadFastq with bad first raises' do
164
+ assert_raise(BioDSL::OptionError) do
165
+ @p.read_fastq(input: @file, first: -1)
166
+ end
167
+ end
168
+
169
+ test 'BioDSL::Pipeline::ReadFastq with bad last raises' do
170
+ assert_raise(BioDSL::OptionError) do
171
+ @p.read_fastq(input: @file, last: -1)
172
+ end
173
+ end
174
+
175
+ test 'BioDSL::Pipeline::ReadFastq with exclusive unique options raises' do
176
+ assert_raise(BioDSL::OptionError) do
177
+ @p.read_fastq(input: @file, first: 1, last: 1)
178
+ end
179
+ end
180
+
181
+ test 'BioDSL::Pipeline::ReadFastq with non-existing input file raises' do
182
+ assert_raise(BioDSL::OptionError) { @p.read_fastq(input: '___adsf') }
183
+ end
184
+
185
+ test 'BioDSL::Pipeline::ReadFastq with non-existing input2 file raises' do
186
+ assert_raise(BioDSL::OptionError) do
187
+ @p.read_fastq(input: '___adsf', input2: '___xsdf')
188
+ end
189
+ end
190
+
191
+ test 'BioDSL::Pipeline::ReadFastq with uneven sized input and ' \
192
+ 'input2 raises' do
193
+ assert_raise(BioDSL::OptionError) do
194
+ @p.read_fastq(input: [@file, @file2], input2: @file3).run
195
+ end
196
+ end
197
+
198
+ test 'BioDSL::Pipeline::ReadFastq with input and non-conclusive ' \
199
+ 'encoding raises' do
200
+ assert_raise(BioDSL::SeqError) { @p.read_fastq(input: @file6).run }
201
+ end
202
+
203
+ test 'BioDSL::Pipeline::ReadFastq with input and input2 and ' \
204
+ 'non-conclusive encoding raises' do
205
+ assert_raise(BioDSL::SeqError) do
206
+ @p.read_fastq(input: @file6, input2: @file6).run
207
+ end
208
+ end
209
+
210
+ test 'BioDSL::Pipeline::ReadFastq with encoding and bad value raises' do
211
+ assert_raise(BioDSL::OptionError) do
212
+ @p.read_fastq(input: @file6, encoding: :foo).run
213
+ end
214
+ end
215
+
216
+ test 'BioDSL::Pipeline::ReadFastq with encoding: :auto don\'t raise' do
217
+ assert_nothing_raised { @p.read_fastq(input: @file, encoding: :auto).run }
218
+ end
219
+
220
+ test 'BioDSL::Pipeline::ReadFastq with encoding: :base_33 don\'t raise' do
221
+ assert_nothing_raised do
222
+ @p.read_fastq(input: @file2, encoding: :base_33).run
223
+ end
224
+ end
225
+
226
+ test 'BioDSL::Pipeline::ReadFastq with encoding: :base_64 don\'t raise' do
227
+ assert_nothing_raised do
228
+ @p.read_fastq(input: @file4, encoding: :base_64).run
229
+ end
230
+ end
231
+
232
+ test 'BioDSL::Pipeline::ReadFastq returns correctly' do
233
+ @p.read_fastq(input: @file).run(output: @output2)
234
+
235
+ expected = <<-EXP.gsub(/^\s+\|/, '')
236
+ |{:SEQ_NAME=>"base_33",
237
+ | :SEQ=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
238
+ | :SEQ_LEN=>94,
239
+ | :SCORES=>"!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
240
+ |{:SEQ_NAME=>"base_64",
241
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
242
+ | :SEQ_LEN=>68,
243
+ | :SCORES=>";<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
244
+ EXP
245
+
246
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
247
+ end
248
+
249
+ test 'BioDSL::Pipeline::ReadFastq status returns correctly' do
250
+ @p.read_fastq(input: @file).run(output: @output2)
251
+
252
+ assert_equal(0, @p.status.first[:records_in])
253
+ assert_equal(2, @p.status.first[:records_out])
254
+ assert_equal(0, @p.status.first[:sequences_in])
255
+ assert_equal(2, @p.status.first[:sequences_out])
256
+ assert_equal(0, @p.status.first[:residues_in])
257
+ assert_equal(162, @p.status.first[:residues_out])
258
+ end
259
+
260
+ test 'BioDSL::Pipeline::ReadFastq with gzipped data returns correctly' do
261
+ `gzip #{@file}`
262
+
263
+ @p.read_fastq(input: "#{@file}.gz").run(output: @output2)
264
+
265
+ expected = <<-EXP.gsub(/^\s+\|/, '')
266
+ |{:SEQ_NAME=>"base_33",
267
+ | :SEQ=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
268
+ | :SEQ_LEN=>94,
269
+ | :SCORES=>"!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
270
+ |{:SEQ_NAME=>"base_64",
271
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
272
+ | :SEQ_LEN=>68,
273
+ | :SCORES=>";<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
274
+ EXP
275
+
276
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
277
+ end
278
+
279
+ test 'BioDSL::Pipeline::ReadFastq with bzip2\'ed data returns correctly' do
280
+ `bzip2 #{@file}`
281
+
282
+ @p.read_fastq(input: "#{@file}.bz2").run(output: @output2)
283
+
284
+ expected = <<-EXP.gsub(/^\s+\|/, '')
285
+ |{:SEQ_NAME=>"base_33",
286
+ | :SEQ=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
287
+ | :SEQ_LEN=>94,
288
+ | :SCORES=>"!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
289
+ |{:SEQ_NAME=>"base_64",
290
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
291
+ | :SEQ_LEN=>68,
292
+ | :SCORES=>";<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
293
+ EXP
294
+
295
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
296
+ end
297
+
298
+ test 'BioDSL::Pipeline::ReadFastq with multiple files returns correctly' do
299
+ @p.read_fastq(input: [@file, @file2]).run(output: @output2)
300
+
301
+ expected = <<-EXP.gsub(/^\s+\|/, '')
302
+ |{:SEQ_NAME=>"base_33",
303
+ | :SEQ=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
304
+ | :SEQ_LEN=>94,
305
+ | :SCORES=>"!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
306
+ |{:SEQ_NAME=>"base_64",
307
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
308
+ | :SEQ_LEN=>68,
309
+ | :SCORES=>";<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
310
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
311
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
312
+ | :SEQ_LEN=>39,
313
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
314
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 1:N:0:14",
315
+ | :SEQ=>"TAGGGAATCTTGCACAATGGAGGAAACTCTGATGCAGCG",
316
+ | :SEQ_LEN=>39,
317
+ | :SCORES=>"<???9?BBBDBDDBDDFFFFFFHHHIFHFHHIHHFHHHH"}
318
+ EXP
319
+
320
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
321
+ end
322
+
323
+ test 'BioDSL::Pipeline::ReadFastq with input glob returns correctly' do
324
+ @p.read_fastq(input: File.join(@tmpdir, 'test*.fq')).run(output: @output2)
325
+
326
+ expected = <<-EXP.gsub(/^\s+\|/, '')
327
+ |{:SEQ_NAME=>"base_33",
328
+ | :SEQ=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
329
+ | :SEQ_LEN=>94,
330
+ | :SCORES=>"!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
331
+ |{:SEQ_NAME=>"base_64",
332
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
333
+ | :SEQ_LEN=>68,
334
+ | :SCORES=>";<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
335
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
336
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
337
+ | :SEQ_LEN=>39,
338
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
339
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 1:N:0:14",
340
+ | :SEQ=>"TAGGGAATCTTGCACAATGGAGGAAACTCTGATGCAGCG",
341
+ | :SEQ_LEN=>39,
342
+ | :SCORES=>"<???9?BBBDBDDBDDFFFFFFHHHIFHFHHIHHFHHHH"}
343
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 2:N:0:14",
344
+ | :SEQ=>"CCTGTTTGCTACCCACGCTTTCGTACCTCAGCGTCAGTA",
345
+ | :SEQ_LEN=>39,
346
+ | :SCORES=>"?????BB<-<BDDDDDFEEFFFHFFHI;F;EGHHDHEF9"}
347
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 2:N:0:14",
348
+ | :SEQ=>"ACTCTTCGCTACCCATGCTTTCGTTCCTCAGCGTCAGTA",
349
+ | :SEQ_LEN=>39,
350
+ | :SCORES=>",5<??BB?DDABDBDDFFFFFFHFHIHFHHIIHEHEHF?"}
351
+ EXP
352
+
353
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
354
+ end
355
+
356
+ test 'BioDSL::Pipeline::ReadFastq with :first returns correctly' do
357
+ @p.read_fastq(input: [@file, @file2], first: 3).run(output: @output2)
358
+
359
+ expected = <<-EXP.gsub(/^\s+\|/, '')
360
+ |{:SEQ_NAME=>"base_33",
361
+ | :SEQ=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
362
+ | :SEQ_LEN=>94,
363
+ | :SCORES=>"!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
364
+ |{:SEQ_NAME=>"base_64",
365
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
366
+ | :SEQ_LEN=>68,
367
+ | :SCORES=>";<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
368
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
369
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
370
+ | :SEQ_LEN=>39,
371
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
372
+ EXP
373
+
374
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
375
+ end
376
+
377
+ test 'BioDSL::Pipeline::ReadFastq#to_s with :first returns correctly' do
378
+ @p.read_fastq(input: @file, first: 3)
379
+
380
+ expected = %{BP.new.read_fastq(input: "#{@file}", first: 3)}
381
+
382
+ assert_equal(expected, @p.to_s)
383
+ end
384
+
385
+ test 'BioDSL::Pipeline::ReadFastq with :last returns correctly' do
386
+ @p.read_fastq(input: [@file, @file2], last: 3).run(output: @output2)
387
+
388
+ expected = <<-EXP.gsub(/^\s+\|/, '')
389
+ |{:SEQ_NAME=>"base_64",
390
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
391
+ | :SEQ_LEN=>68,
392
+ | :SCORES=>";<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"}
393
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
394
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
395
+ | :SEQ_LEN=>39,
396
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
397
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 1:N:0:14",
398
+ | :SEQ=>"TAGGGAATCTTGCACAATGGAGGAAACTCTGATGCAGCG",
399
+ | :SEQ_LEN=>39,
400
+ | :SCORES=>"<???9?BBBDBDDBDDFFFFFFHHHIFHFHHIHHFHHHH"}
401
+ EXP
402
+
403
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
404
+ end
405
+
406
+ test 'BioDSL::Pipeline::ReadFastq with :input and :input2 returns OK' do
407
+ @p.read_fastq(input: @file2, input2: @file3, encoding: :base_33).
408
+ run(output: @output2)
409
+
410
+ expected = <<-EXP.gsub(/^\s+\|/, '')
411
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
412
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
413
+ | :SEQ_LEN=>39,
414
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
415
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 2:N:0:14",
416
+ | :SEQ=>"CCTGTTTGCTACCCACGCTTTCGTACCTCAGCGTCAGTA",
417
+ | :SEQ_LEN=>39,
418
+ | :SCORES=>"?????BB<-<BDDDDDFEEFFFHFFHI;F;EGHHDHEF9"}
419
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 1:N:0:14",
420
+ | :SEQ=>"TAGGGAATCTTGCACAATGGAGGAAACTCTGATGCAGCG",
421
+ | :SEQ_LEN=>39,
422
+ | :SCORES=>"<???9?BBBDBDDBDDFFFFFFHHHIFHFHHIHHFHHHH"}
423
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 2:N:0:14",
424
+ | :SEQ=>"ACTCTTCGCTACCCATGCTTTCGTTCCTCAGCGTCAGTA",
425
+ | :SEQ_LEN=>39,
426
+ | :SCORES=>",5<??BB?DDABDBDDFFFFFFHFHIHFHHIIHEHEHF?"}
427
+ EXP
428
+
429
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
430
+ end
431
+
432
+ test 'BioDSL::Pipeline::ReadFastq status with :input and :input2 ' \
433
+ 'returns correctly' do
434
+ @p.read_fastq(input: @file2, input2: @file3, encoding: :base_33).
435
+ run(output: @output2)
436
+
437
+ assert_equal(156, @p.status.first[:residues_out])
438
+ end
439
+
440
+ test 'BioDSL::Pipeline::ReadFastq with :input and :input2 and ' \
441
+ ':first returns correctly' do
442
+ @p.read_fastq(input: @file2, input2: @file3, encoding: :base_33, first: 2).
443
+ run(output: @output2)
444
+
445
+ expected = <<-EXP.gsub(/^\s+\|/, '')
446
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
447
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
448
+ | :SEQ_LEN=>39,
449
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
450
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 2:N:0:14",
451
+ | :SEQ=>"CCTGTTTGCTACCCACGCTTTCGTACCTCAGCGTCAGTA",
452
+ | :SEQ_LEN=>39,
453
+ | :SCORES=>"?????BB<-<BDDDDDFEEFFFHFFHI;F;EGHHDHEF9"}
454
+ EXP
455
+
456
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
457
+ end
458
+
459
+ test 'BioDSL::Pipeline::ReadFastq with :input and :input2 and :last ' \
460
+ 'returns correctly' do
461
+ @p.read_fastq(input: @file2, input2: @file3, last: 2, encoding: :base_33).
462
+ run(output: @output2)
463
+
464
+ expected = <<-EXP.gsub(/^\s+\|/, '')
465
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 1:N:0:14",
466
+ | :SEQ=>"TAGGGAATCTTGCACAATGGAGGAAACTCTGATGCAGCG",
467
+ | :SEQ_LEN=>39,
468
+ | :SCORES=>"<???9?BBBDBDDBDDFFFFFFHHHIFHFHHIHHFHHHH"}
469
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 2:N:0:14",
470
+ | :SEQ=>"ACTCTTCGCTACCCATGCTTTCGTTCCTCAGCGTCAGTA",
471
+ | :SEQ_LEN=>39,
472
+ | :SCORES=>",5<??BB?DDABDBDDFFFFFFHFHIHFHHIIHEHEHF?"}
473
+ EXP
474
+
475
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
476
+ end
477
+
478
+ test 'BioDSL::Pipeline::ReadFastq with base_64 :input returns correctly' do
479
+ @p.read_fastq(input: @file4).run(output: @output2)
480
+
481
+ expected = <<-EXP.gsub(/^\s+\|/, '')
482
+ |{:SEQ_NAME=>"base_64",
483
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
484
+ | :SEQ_LEN=>68,
485
+ | :SCORES=>"!!!!!!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIII\"}
486
+ EXP
487
+
488
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
489
+ end
490
+
491
+ test 'BioDSL::Pipeline::ReadFastq with base_64 :input and :input2 ' \
492
+ 'returns correctly' do
493
+ @p.read_fastq(input: @file4, input2: @file5).run(output: @output2)
494
+
495
+ expected = <<-EXP.gsub(/^\s+\|/, '')
496
+ |{:SEQ_NAME=>"base_64",
497
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
498
+ | :SEQ_LEN=>68,
499
+ | :SCORES=>"!!!!!!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIIIII\"}
500
+ |{:SEQ_NAME=>"base_64_2",
501
+ | :SEQ=>"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
502
+ | :SEQ_LEN=>64,
503
+ | :SCORES=>"!!!!\\\"\\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIIIIIIIIIIIIIIIIIIII\"}
504
+ EXP
505
+
506
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
507
+ end
508
+
509
+ test 'BioDSL::Pipeline::ReadFastq with base_64 :input and :input2 and ' \
510
+ ':reverse_complement returns correctly' do
511
+ @p.read_fastq(input: @file2, input2: @file3, first: 2,
512
+ reverse_complement: true, encoding: :base_33).
513
+ run(output: @output2)
514
+
515
+ expected = <<-EXP.gsub(/^\s+\|/, '')
516
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
517
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
518
+ | :SEQ_LEN=>39,
519
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
520
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 2:N:0:14",
521
+ | :SEQ=>"TACTGACGCTGAGGTACGAAAGCGTGGGTAGCAAACAGG",
522
+ | :SEQ_LEN=>39,
523
+ | :SCORES=>"9FEHDHHGE;F;IHFFHFFFEEFDDDDDB<-<BB?????"}
524
+ EXP
525
+
526
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
527
+ end
528
+
529
+ test 'BioDSL::Pipeline::ReadFastq with flux returns correctly' do
530
+ @p.read_fastq(input: @file2, encoding: :base_33).
531
+ run(input: @input, output: @output2)
532
+
533
+ expected = <<-EXP.gsub(/^\s+\|/, '')
534
+ |{:SEQ_NAME=>"test1",
535
+ | :SEQ=>"atgcagcac",
536
+ | :SEQ_LEN=>9}
537
+ |{:SEQ_NAME=>"test2",
538
+ | :SEQ=>"acagcactgA",
539
+ | :SEQ_LEN=>10}
540
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:14862:1868 1:N:0:14",
541
+ | :SEQ=>"TGGGGAATATTGGACAATGGGGGCAACCCTGATCCAGCA",
542
+ | :SEQ_LEN=>39,
543
+ | :SCORES=>"<??????BDDDDDDDDGGGGGGGHHIIIEHIHHFGGHFH"}
544
+ |{:SEQ_NAME=>"M01168:16:000000000-A1R9L:1:1101:13906:2139 1:N:0:14",
545
+ | :SEQ=>"TAGGGAATCTTGCACAATGGAGGAAACTCTGATGCAGCG",
546
+ | :SEQ_LEN=>39,
547
+ | :SCORES=>"<???9?BBBDBDDBDDFFFFFFHHHIFHFHHIHHFHHHH"}
548
+ EXP
549
+
550
+ assert_equal(expected.delete("\n"), collect_result.delete("\n"))
551
+ end
552
+ end