bio-samtools 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/VERSION +1 -1
  2. data/bio-samtools.gemspec +60 -6
  3. data/doc/Bio.html +171 -0
  4. data/doc/Bio/DB.html +163 -0
  5. data/doc/Bio/DB/Alignment.html +780 -0
  6. data/doc/Bio/DB/SAM.html +1241 -0
  7. data/doc/Bio/DB/SAM/Library.html +217 -0
  8. data/doc/Bio/DB/SAM/Tools.html +331 -0
  9. data/doc/Bio/DB/SAM/Tools/Bam1CoreT.html +159 -0
  10. data/doc/Bio/DB/SAM/Tools/Bam1T.html +220 -0
  11. data/doc/Bio/DB/SAM/Tools/BamHeaderT.html +249 -0
  12. data/doc/Bio/DB/SAM/Tools/BamPileup1T.html +159 -0
  13. data/doc/Bio/DB/SAM/Tools/SamfileT.html +171 -0
  14. data/doc/Bio/DB/SAM/Tools/SamfileTX.html +159 -0
  15. data/doc/Bio/DB/SAMException.html +205 -0
  16. data/doc/Bio/DB/Tag.html +254 -0
  17. data/doc/LICENSE_txt.html +881 -0
  18. data/doc/LibC.html +153 -0
  19. data/doc/Pileup.html +571 -0
  20. data/doc/Vcf.html +473 -0
  21. data/doc/created.rid +10 -1
  22. data/doc/images/add.png +0 -0
  23. data/doc/images/brick.png +0 -0
  24. data/doc/images/brick_link.png +0 -0
  25. data/doc/images/bug.png +0 -0
  26. data/doc/images/bullet_black.png +0 -0
  27. data/doc/images/bullet_toggle_minus.png +0 -0
  28. data/doc/images/bullet_toggle_plus.png +0 -0
  29. data/doc/images/date.png +0 -0
  30. data/doc/images/delete.png +0 -0
  31. data/doc/images/find.png +0 -0
  32. data/doc/images/loadingAnimation.gif +0 -0
  33. data/doc/images/macFFBgHack.png +0 -0
  34. data/doc/images/package.png +0 -0
  35. data/doc/images/page_green.png +0 -0
  36. data/doc/images/page_white_text.png +0 -0
  37. data/doc/images/page_white_width.png +0 -0
  38. data/doc/images/plugin.png +0 -0
  39. data/doc/images/ruby.png +0 -0
  40. data/doc/images/tag_blue.png +0 -0
  41. data/doc/images/tag_green.png +0 -0
  42. data/doc/images/transparent.png +0 -0
  43. data/doc/images/wrench.png +0 -0
  44. data/doc/images/wrench_orange.png +0 -0
  45. data/doc/images/zoom.png +0 -0
  46. data/doc/index.html +109 -21
  47. data/doc/js/darkfish.js +153 -0
  48. data/doc/js/jquery.js +18 -0
  49. data/doc/js/navigation.js +142 -0
  50. data/doc/js/search.js +94 -0
  51. data/doc/js/search_index.js +1 -0
  52. data/doc/js/searcher.js +228 -0
  53. data/doc/lib/bio-samtools_rb.html +115 -0
  54. data/doc/lib/bio/db/sam/bam_rb.html +121 -0
  55. data/doc/lib/bio/db/sam/faidx_rb.html +117 -0
  56. data/doc/lib/bio/db/sam/library_rb.html +115 -0
  57. data/doc/lib/bio/db/sam/pileup_rb.html +171 -0
  58. data/doc/lib/bio/db/sam/sam_rb.html +121 -0
  59. data/doc/lib/bio/db/sam/vcf_rb.html +124 -0
  60. data/doc/lib/bio/db/sam_rb.html +115 -0
  61. data/doc/rdoc.css +543 -0
  62. data/doc/table_of_contents.html +186 -0
  63. data/ext/Makefile-bioruby.patch +1 -1
  64. data/ext/Rakefile +8 -1
  65. data/ext/mkrf_conf.rb +8 -1
  66. data/lib/bio/db/sam.rb +140 -27
  67. data/lib/bio/db/sam/vcf.rb +0 -1
  68. data/test/basictest.rb +4 -4
  69. data/test/test_basic.rb +50 -34
  70. metadata +79 -25
  71. data/test/coverage.rb +0 -26
  72. data/test/coverage_plot.rb +0 -28
  73. data/test/feature.rb +0 -0
  74. data/test/test_pileup.rb +0 -68
data/doc/LibC.html ADDED
@@ -0,0 +1,153 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Module: LibC</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/bio/db/sam.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+
60
+
61
+
62
+ </div>
63
+
64
+ <div id="project-metadata">
65
+ <nav id="fileindex-section" class="section project-section">
66
+ <h3 class="section-header">Pages</h3>
67
+
68
+ <ul>
69
+
70
+ <li class="file"><a href="./LICENSE_txt.html">LICENSE</a>
71
+
72
+ </ul>
73
+ </nav>
74
+
75
+ <nav id="classindex-section" class="section project-section">
76
+ <h3 class="section-header">Class and Module Index</h3>
77
+
78
+ <ul class="link-list">
79
+
80
+ <li><a href="./Bio.html">Bio</a>
81
+
82
+ <li><a href="./Bio/DB.html">Bio::DB</a>
83
+
84
+ <li><a href="./Bio/DB/Alignment.html">Bio::DB::Alignment</a>
85
+
86
+ <li><a href="./Bio/DB/SAM.html">Bio::DB::SAM</a>
87
+
88
+ <li><a href="./Bio/DB/SAM/Library.html">Bio::DB::SAM::Library</a>
89
+
90
+ <li><a href="./Bio/DB/SAM/Tools.html">Bio::DB::SAM::Tools</a>
91
+
92
+ <li><a href="./Bio/DB/SAM/Tools/Bam1CoreT.html">Bio::DB::SAM::Tools::Bam1CoreT</a>
93
+
94
+ <li><a href="./Bio/DB/SAM/Tools/Bam1T.html">Bio::DB::SAM::Tools::Bam1T</a>
95
+
96
+ <li><a href="./Bio/DB/SAM/Tools/BamHeaderT.html">Bio::DB::SAM::Tools::BamHeaderT</a>
97
+
98
+ <li><a href="./Bio/DB/SAM/Tools/BamPileup1T.html">Bio::DB::SAM::Tools::BamPileup1T</a>
99
+
100
+ <li><a href="./Bio/DB/SAM/Tools/SamfileT.html">Bio::DB::SAM::Tools::SamfileT</a>
101
+
102
+ <li><a href="./Bio/DB/SAM/Tools/SamfileTX.html">Bio::DB::SAM::Tools::SamfileTX</a>
103
+
104
+ <li><a href="./Bio/DB/SAMException.html">Bio::DB::SAMException</a>
105
+
106
+ <li><a href="./Bio/DB/Sam.html">Bio::DB::Sam</a>
107
+
108
+ <li><a href="./Bio/DB/Tag.html">Bio::DB::Tag</a>
109
+
110
+ <li><a href="./LibC.html">LibC</a>
111
+
112
+ <li><a href="./Pileup.html">Pileup</a>
113
+
114
+ <li><a href="./Vcf.html">Vcf</a>
115
+
116
+ </ul>
117
+ </nav>
118
+
119
+ </div>
120
+ </nav>
121
+
122
+ <div id="documentation">
123
+ <h1 class="module">module LibC</h1>
124
+
125
+ <div id="description" class="description">
126
+
127
+ </div><!-- description -->
128
+
129
+
130
+
131
+
132
+ <section id="5Buntitled-5D" class="documentation-section">
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <!-- Methods -->
142
+
143
+ </section><!-- 5Buntitled-5D -->
144
+
145
+ </div><!-- documentation -->
146
+
147
+
148
+ <footer id="validator-badges">
149
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
150
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
151
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
152
+ </footer>
153
+
data/doc/Pileup.html ADDED
@@ -0,0 +1,571 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Class: Pileup</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/bio/db/sam/pileup.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">Object
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-c-new">::new</a>
74
+
75
+ <li><a href="#method-i-non_ref_count">#non_ref_count</a>
76
+
77
+ <li><a href="#method-i-non_refs">#non_refs</a>
78
+
79
+ <li><a href="#method-i-ref_count">#ref_count</a>
80
+
81
+ </ul>
82
+ </nav>
83
+
84
+ </div>
85
+
86
+ <div id="project-metadata">
87
+ <nav id="fileindex-section" class="section project-section">
88
+ <h3 class="section-header">Pages</h3>
89
+
90
+ <ul>
91
+
92
+ <li class="file"><a href="./LICENSE_txt.html">LICENSE</a>
93
+
94
+ </ul>
95
+ </nav>
96
+
97
+ <nav id="classindex-section" class="section project-section">
98
+ <h3 class="section-header">Class and Module Index</h3>
99
+
100
+ <ul class="link-list">
101
+
102
+ <li><a href="./Bio.html">Bio</a>
103
+
104
+ <li><a href="./Bio/DB.html">Bio::DB</a>
105
+
106
+ <li><a href="./Bio/DB/Alignment.html">Bio::DB::Alignment</a>
107
+
108
+ <li><a href="./Bio/DB/SAM.html">Bio::DB::SAM</a>
109
+
110
+ <li><a href="./Bio/DB/SAM/Library.html">Bio::DB::SAM::Library</a>
111
+
112
+ <li><a href="./Bio/DB/SAM/Tools.html">Bio::DB::SAM::Tools</a>
113
+
114
+ <li><a href="./Bio/DB/SAM/Tools/Bam1CoreT.html">Bio::DB::SAM::Tools::Bam1CoreT</a>
115
+
116
+ <li><a href="./Bio/DB/SAM/Tools/Bam1T.html">Bio::DB::SAM::Tools::Bam1T</a>
117
+
118
+ <li><a href="./Bio/DB/SAM/Tools/BamHeaderT.html">Bio::DB::SAM::Tools::BamHeaderT</a>
119
+
120
+ <li><a href="./Bio/DB/SAM/Tools/BamPileup1T.html">Bio::DB::SAM::Tools::BamPileup1T</a>
121
+
122
+ <li><a href="./Bio/DB/SAM/Tools/SamfileT.html">Bio::DB::SAM::Tools::SamfileT</a>
123
+
124
+ <li><a href="./Bio/DB/SAM/Tools/SamfileTX.html">Bio::DB::SAM::Tools::SamfileTX</a>
125
+
126
+ <li><a href="./Bio/DB/SAMException.html">Bio::DB::SAMException</a>
127
+
128
+ <li><a href="./Bio/DB/Sam.html">Bio::DB::Sam</a>
129
+
130
+ <li><a href="./Bio/DB/Tag.html">Bio::DB::Tag</a>
131
+
132
+ <li><a href="./LibC.html">LibC</a>
133
+
134
+ <li><a href="./Pileup.html">Pileup</a>
135
+
136
+ <li><a href="./Vcf.html">Vcf</a>
137
+
138
+ </ul>
139
+ </nav>
140
+
141
+ </div>
142
+ </nav>
143
+
144
+ <div id="documentation">
145
+ <h1 class="class">class Pileup</h1>
146
+
147
+ <div id="description" class="description">
148
+
149
+ <h1 id="label-Pileup+"><a href="Pileup.html">Pileup</a> </h1>
150
+
151
+ <p>A class representing information in SAMTools pileup format</p>
152
+ <dl class="rdoc-list note-list"><dt>Author
153
+ <dd>
154
+ <p>Dan MacLean (tsl at dan.maclean.ac.uk)</p>
155
+ </dd></dl>
156
+
157
+ <p><a href="Pileup.html">Pileup</a> is described at <a
158
+ href="http://sourceforge.net/apps/mediawiki/samtools/index.php?title=SAM_FAQ#I_do_not_understand_the_columns_in_the_pileup_output">sourceforge.net/apps/mediawiki/samtools/index.php?title=SAM_FAQ#I_do_not_understand_the_columns_in_the_pileup_output</a>.
159
+ Briefly (when you invoke pileup with the -c option):</p>
160
+ <ul><li>
161
+ <p>1 reference sequence name</p>
162
+ </li><li>
163
+ <p>2 reference coordinate</p>
164
+ </li><li>
165
+ <p>(3) reference base, or `*‘ for an indel line</p>
166
+ </li><li>
167
+ <p>(4) genotype where heterozygotes are encoded in the IUB code: M=A/C, R=A/G,
168
+ W=A/T, S=C/G, Y=C/T and K=G/T; indels are indicated by, for example, +A,
169
+ -A or +CC/-C. There is no difference between */+A or +A/*.</p>
170
+ </li><li>
171
+ <p>(5) Phred-scaled likelihood that the genotype is wrong, which is also
172
+ called `consensus quality’.</p>
173
+ </li><li>
174
+ <p>(6) Phred-scaled likelihood that the genotype is identical to the
175
+ reference, which is also called `SNP quality’. Suppose the reference base
176
+ is A and in alignment we see 17 G and 3 A. We will get a low consensus
177
+ quality because it is difficult to distinguish an A/G heterozygote from a
178
+ G/G homozygote. We will get a high SNP quality, though, because the
179
+ evidence of a SNP is very strong.</p>
180
+ </li><li>
181
+ <p>(7) root mean square (RMS) mapping quality</p>
182
+ </li><li>
183
+ <p>8 # reads covering the position</p>
184
+ </li><li>
185
+ <p>9 read bases at a SNP line (check the manual page for more information);
186
+ the 1st indel allele otherwise</p>
187
+ </li><li>
188
+ <p>10 base quality at a SNP line; the 2nd indel allele otherwise</p>
189
+ </li><li>
190
+ <p>(11) indel line only: # reads directly supporting the 1st indel allele</p>
191
+ </li><li>
192
+ <p>(12) indel line only: # reads directly supporting the 2nd indel allele</p>
193
+ </li><li>
194
+ <p>(13) indel line only: # reads supporting a third indel allele</p>
195
+ </li></ul>
196
+
197
+ <p>If pileup is invoked without `-c’, indel lines and columns between 3 and
198
+ 7 inclusive will not be outputted.</p>
199
+
200
+ <p>NB mpileup uses the 6 column output format eg
201
+ “seq2t151tGtGt36t0t99t12t.….……At:9&lt;;;7=&lt;&lt;&lt;&lt;&lt;”
202
+ <a href="Pileup.html">Pileup</a> provides accessors for all columns (6 or
203
+ 10 column format) and a few other useful methods</p>
204
+
205
+ </div><!-- description -->
206
+
207
+
208
+
209
+
210
+ <section id="5Buntitled-5D" class="documentation-section">
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ <!-- Attributes -->
219
+ <section id="attribute-method-details" class="method-section section">
220
+ <h3 class="section-header">Attributes</h3>
221
+
222
+
223
+ <div id="attribute-i-ar1" class="method-detail">
224
+ <div class="method-heading attribute-method-heading">
225
+ <span class="method-name">ar1</span><span
226
+ class="attribute-access-type">[RW]</span>
227
+ </div>
228
+
229
+ <div class="method-description">
230
+
231
+
232
+
233
+ </div>
234
+ </div>
235
+
236
+ <div id="attribute-i-ar2" class="method-detail">
237
+ <div class="method-heading attribute-method-heading">
238
+ <span class="method-name">ar2</span><span
239
+ class="attribute-access-type">[RW]</span>
240
+ </div>
241
+
242
+ <div class="method-description">
243
+
244
+
245
+
246
+ </div>
247
+ </div>
248
+
249
+ <div id="attribute-i-ar3" class="method-detail">
250
+ <div class="method-heading attribute-method-heading">
251
+ <span class="method-name">ar3</span><span
252
+ class="attribute-access-type">[RW]</span>
253
+ </div>
254
+
255
+ <div class="method-description">
256
+
257
+
258
+
259
+ </div>
260
+ </div>
261
+
262
+ <div id="attribute-i-consensus" class="method-detail">
263
+ <div class="method-heading attribute-method-heading">
264
+ <span class="method-name">consensus</span><span
265
+ class="attribute-access-type">[RW]</span>
266
+ </div>
267
+
268
+ <div class="method-description">
269
+
270
+
271
+
272
+ </div>
273
+ </div>
274
+
275
+ <div id="attribute-i-consensus_quality" class="method-detail">
276
+ <div class="method-heading attribute-method-heading">
277
+ <span class="method-name">consensus_quality</span><span
278
+ class="attribute-access-type">[RW]</span>
279
+ </div>
280
+
281
+ <div class="method-description">
282
+
283
+
284
+
285
+ </div>
286
+ </div>
287
+
288
+ <div id="attribute-i-coverage" class="method-detail">
289
+ <div class="method-heading attribute-method-heading">
290
+ <span class="method-name">coverage</span><span
291
+ class="attribute-access-type">[RW]</span>
292
+ </div>
293
+
294
+ <div class="method-description">
295
+
296
+
297
+
298
+ </div>
299
+ </div>
300
+
301
+ <div id="attribute-i-pos" class="method-detail">
302
+ <div class="method-heading attribute-method-heading">
303
+ <span class="method-name">pos</span><span
304
+ class="attribute-access-type">[RW]</span>
305
+ </div>
306
+
307
+ <div class="method-description">
308
+
309
+
310
+
311
+ </div>
312
+ </div>
313
+
314
+ <div id="attribute-i-read_bases" class="method-detail">
315
+ <div class="method-heading attribute-method-heading">
316
+ <span class="method-name">read_bases</span><span
317
+ class="attribute-access-type">[RW]</span>
318
+ </div>
319
+
320
+ <div class="method-description">
321
+
322
+
323
+
324
+ </div>
325
+ </div>
326
+
327
+ <div id="attribute-i-read_quals" class="method-detail">
328
+ <div class="method-heading attribute-method-heading">
329
+ <span class="method-name">read_quals</span><span
330
+ class="attribute-access-type">[RW]</span>
331
+ </div>
332
+
333
+ <div class="method-description">
334
+
335
+
336
+
337
+ </div>
338
+ </div>
339
+
340
+ <div id="attribute-i-ref_base" class="method-detail">
341
+ <div class="method-heading attribute-method-heading">
342
+ <span class="method-name">ref_base</span><span
343
+ class="attribute-access-type">[RW]</span>
344
+ </div>
345
+
346
+ <div class="method-description">
347
+
348
+
349
+
350
+ </div>
351
+ </div>
352
+
353
+ <div id="attribute-i-ref_name" class="method-detail">
354
+ <div class="method-heading attribute-method-heading">
355
+ <span class="method-name">ref_name</span><span
356
+ class="attribute-access-type">[RW]</span>
357
+ </div>
358
+
359
+ <div class="method-description">
360
+
361
+
362
+
363
+ </div>
364
+ </div>
365
+
366
+ <div id="attribute-i-rms_mapq" class="method-detail">
367
+ <div class="method-heading attribute-method-heading">
368
+ <span class="method-name">rms_mapq</span><span
369
+ class="attribute-access-type">[RW]</span>
370
+ </div>
371
+
372
+ <div class="method-description">
373
+
374
+
375
+
376
+ </div>
377
+ </div>
378
+
379
+ <div id="attribute-i-snp_quality" class="method-detail">
380
+ <div class="method-heading attribute-method-heading">
381
+ <span class="method-name">snp_quality</span><span
382
+ class="attribute-access-type">[RW]</span>
383
+ </div>
384
+
385
+ <div class="method-description">
386
+
387
+
388
+
389
+ </div>
390
+ </div>
391
+
392
+ </section><!-- attribute-method-details -->
393
+
394
+
395
+ <!-- Methods -->
396
+
397
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
398
+ <h3 class="section-header">Public Class Methods</h3>
399
+
400
+
401
+ <div id="method-c-new" class="method-detail ">
402
+
403
+ <div class="method-heading">
404
+ <span class="method-name">new</span><span
405
+ class="method-args">(pile_up_line)</span>
406
+ <span class="method-click-advice">click to toggle source</span>
407
+ </div>
408
+
409
+
410
+ <div class="method-description">
411
+
412
+ <p>creates the <a href="Pileup.html">Pileup</a> object</p>
413
+
414
+ <pre>pile_up_line = &quot;seq2\t151\tG\tG\t36\t0\t99\t12\t...........A\t:9&lt;;;7=&lt;&lt;&lt;&lt;&lt;&quot;
415
+ pile = Pileup.new(pile_up_line)</pre>
416
+
417
+
418
+
419
+ <div class="method-source-code" id="new-source">
420
+ <pre><span class="ruby-comment"># File lib/bio/db/sam/pileup.rb, line 34</span>
421
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">pile_up_line</span>)
422
+ <span class="ruby-identifier">cols</span> = <span class="ruby-identifier">pile_up_line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/\t/</span>)
423
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">6</span> <span class="ruby-comment">##should only be able to get 6 lines from mpileup</span>
424
+ <span class="ruby-ivar">@ref_name</span>, <span class="ruby-ivar">@pos</span>, <span class="ruby-ivar">@ref_base</span>, <span class="ruby-ivar">@coverage</span>, <span class="ruby-ivar">@read_bases</span>, <span class="ruby-ivar">@read_quals</span> = <span class="ruby-identifier">cols</span>
425
+ <span class="ruby-keyword">elsif</span> (<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">13</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">length</span>) <span class="ruby-comment">##incase anyone tries to use deprecated pileup with -c flag we get upto 13 cols...</span>
426
+ <span class="ruby-ivar">@ref_name</span>, <span class="ruby-ivar">@pos</span>, <span class="ruby-ivar">@ref_base</span>, <span class="ruby-ivar">@consensus</span>, <span class="ruby-ivar">@consensus_quality</span>, <span class="ruby-ivar">@snp_quality</span>, <span class="ruby-ivar">@rms_mapq</span>, <span class="ruby-ivar">@coverage</span>, <span class="ruby-ivar">@read_bases</span>, <span class="ruby-ivar">@read_quals</span>, <span class="ruby-ivar">@ar1</span>, <span class="ruby-ivar">@ar2</span>, <span class="ruby-ivar">@ar3</span> = <span class="ruby-identifier">cols</span>
427
+ <span class="ruby-ivar">@consensus_quality</span> = <span class="ruby-ivar">@consensus_quality</span>.<span class="ruby-identifier">to_f</span>
428
+ <span class="ruby-ivar">@snp_quality</span> = <span class="ruby-ivar">@snp_quality</span>.<span class="ruby-identifier">to_f</span>
429
+ <span class="ruby-ivar">@rms_mapq</span> = <span class="ruby-ivar">@rms_mapq</span>.<span class="ruby-identifier">to_f</span>
430
+ <span class="ruby-keyword">else</span>
431
+ <span class="ruby-comment">#raise RuntimeError, &quot;parsing line '#{pile_up_line.chomp}' failed&quot;</span>
432
+ <span class="ruby-keyword">end</span>
433
+
434
+ <span class="ruby-ivar">@pos</span> = <span class="ruby-ivar">@pos</span>.<span class="ruby-identifier">to_i</span>
435
+ <span class="ruby-ivar">@coverage</span> = <span class="ruby-ivar">@coverage</span>.<span class="ruby-identifier">to_f</span>
436
+ <span class="ruby-ivar">@ref_count</span> = <span class="ruby-keyword">nil</span>
437
+ <span class="ruby-ivar">@non_ref_count_hash</span> = <span class="ruby-keyword">nil</span>
438
+ <span class="ruby-ivar">@non_ref_count</span> = <span class="ruby-keyword">nil</span>
439
+ <span class="ruby-keyword">end</span></pre>
440
+ </div><!-- new-source -->
441
+
442
+ </div>
443
+
444
+
445
+
446
+
447
+ </div><!-- new-method -->
448
+
449
+
450
+ </section><!-- public-class-method-details -->
451
+
452
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
453
+ <h3 class="section-header">Public Instance Methods</h3>
454
+
455
+
456
+ <div id="method-i-non_ref_count" class="method-detail ">
457
+
458
+ <div class="method-heading">
459
+ <span class="method-name">non_ref_count</span><span
460
+ class="method-args">()</span>
461
+ <span class="method-click-advice">click to toggle source</span>
462
+ </div>
463
+
464
+
465
+ <div class="method-description">
466
+
467
+ <p>returns the total non-reference bases in the reads at this position</p>
468
+
469
+
470
+
471
+ <div class="method-source-code" id="non_ref_count-source">
472
+ <pre><span class="ruby-comment"># File lib/bio/db/sam/pileup.rb, line 64</span>
473
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">non_ref_count</span>
474
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@non_ref_count</span>.<span class="ruby-identifier">nil?</span>
475
+ <span class="ruby-ivar">@non_ref_count</span> = <span class="ruby-ivar">@read_bases</span>.<span class="ruby-identifier">count</span>(<span class="ruby-string">&quot;ATGCatgc&quot;</span>).<span class="ruby-identifier">to_f</span>
476
+ <span class="ruby-keyword">end</span>
477
+ <span class="ruby-ivar">@non_ref_count</span>
478
+ <span class="ruby-keyword">end</span></pre>
479
+ </div><!-- non_ref_count-source -->
480
+
481
+ </div>
482
+
483
+
484
+
485
+
486
+ </div><!-- non_ref_count-method -->
487
+
488
+
489
+ <div id="method-i-non_refs" class="method-detail ">
490
+
491
+ <div class="method-heading">
492
+ <span class="method-name">non_refs</span><span
493
+ class="method-args">()</span>
494
+ <span class="method-click-advice">click to toggle source</span>
495
+ </div>
496
+
497
+
498
+ <div class="method-description">
499
+
500
+ <p>Calculate the total count of each non-reference nucleotide and return a
501
+ hash of all 4 nt counts, returns a hash</p>
502
+
503
+ <pre class="ruby"><span class="ruby-identifier">pile</span>.<span class="ruby-identifier">non_refs</span> <span class="ruby-comment">#{:A =&gt; 1, :C =&gt; 0, :T =&gt; 0, :G =&gt; 0}</span>
504
+ </pre>
505
+
506
+
507
+
508
+ <div class="method-source-code" id="non_refs-source">
509
+ <pre><span class="ruby-comment"># File lib/bio/db/sam/pileup.rb, line 56</span>
510
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">non_refs</span>
511
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@non_ref_count_hash</span>.<span class="ruby-identifier">nil?</span>
512
+ <span class="ruby-ivar">@non_ref_count_hash</span> = {<span class="ruby-value">:A</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">read_bases</span>.<span class="ruby-identifier">count</span>(<span class="ruby-string">&quot;Aa&quot;</span>), <span class="ruby-value">:C</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">read_bases</span>.<span class="ruby-identifier">count</span>(<span class="ruby-string">&quot;Cc&quot;</span>), <span class="ruby-value">:G</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">read_bases</span>.<span class="ruby-identifier">count</span>(<span class="ruby-string">&quot;Gg&quot;</span>), <span class="ruby-value">:T</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">read_bases</span>.<span class="ruby-identifier">count</span>(<span class="ruby-string">&quot;Tt&quot;</span>)}
513
+ <span class="ruby-keyword">end</span>
514
+ <span class="ruby-ivar">@non_ref_count_hash</span>
515
+ <span class="ruby-keyword">end</span></pre>
516
+ </div><!-- non_refs-source -->
517
+
518
+ </div>
519
+
520
+
521
+
522
+
523
+ </div><!-- non_refs-method -->
524
+
525
+
526
+ <div id="method-i-ref_count" class="method-detail ">
527
+
528
+ <div class="method-heading">
529
+ <span class="method-name">ref_count</span><span
530
+ class="method-args">()</span>
531
+ <span class="method-click-advice">click to toggle source</span>
532
+ </div>
533
+
534
+
535
+ <div class="method-description">
536
+
537
+ <p>returns the count of reference-bases in the reads at this position</p>
538
+
539
+
540
+
541
+ <div class="method-source-code" id="ref_count-source">
542
+ <pre><span class="ruby-comment"># File lib/bio/db/sam/pileup.rb, line 72</span>
543
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">ref_count</span>
544
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@ref_count</span>.<span class="ruby-identifier">nil?</span>
545
+ <span class="ruby-ivar">@ref_count</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">read_bases</span>.<span class="ruby-identifier">count</span>(<span class="ruby-string">&quot;.,&quot;</span>)
546
+ <span class="ruby-keyword">end</span>
547
+ <span class="ruby-ivar">@ref_count</span>
548
+ <span class="ruby-keyword">end</span></pre>
549
+ </div><!-- ref_count-source -->
550
+
551
+ </div>
552
+
553
+
554
+
555
+
556
+ </div><!-- ref_count-method -->
557
+
558
+
559
+ </section><!-- public-instance-method-details -->
560
+
561
+ </section><!-- 5Buntitled-5D -->
562
+
563
+ </div><!-- documentation -->
564
+
565
+
566
+ <footer id="validator-badges">
567
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
568
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
569
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
570
+ </footer>
571
+