bio-samtools 0.6.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -2
  3. data/README.md +4 -7
  4. data/VERSION +1 -1
  5. data/bio-samtools.gemspec +47 -105
  6. data/doc/Bio.html +68 -131
  7. data/doc/Bio/DB.html +51 -111
  8. data/doc/Bio/DB/Alignment.html +135 -363
  9. data/doc/Bio/DB/Pileup.html +183 -170
  10. data/doc/Bio/DB/SAM.html +1396 -820
  11. data/doc/Bio/DB/SAM/Library.html +73 -123
  12. data/doc/Bio/DB/SAM/Tools.html +51 -273
  13. data/doc/Bio/DB/Tag.html +78 -124
  14. data/doc/Bio/DB/Vcf.html +111 -147
  15. data/doc/LICENSE_txt.html +113 -148
  16. data/doc/created.rid +9 -10
  17. data/doc/fonts.css +167 -0
  18. data/doc/fonts/Lato-Light.ttf +0 -0
  19. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  20. data/doc/fonts/Lato-Regular.ttf +0 -0
  21. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  22. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  23. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  24. data/doc/images/add.png +0 -0
  25. data/doc/images/arrow_up.png +0 -0
  26. data/doc/images/delete.png +0 -0
  27. data/doc/images/tag_blue.png +0 -0
  28. data/doc/index.html +48 -54
  29. data/doc/js/darkfish.js +9 -22
  30. data/doc/js/search.js +20 -5
  31. data/doc/js/search_index.js +1 -1
  32. data/doc/rdoc.css +255 -218
  33. data/doc/table_of_contents.html +256 -137
  34. data/ext/Rakefile +57 -0
  35. data/lib/bio-samtools.rb +7 -2
  36. data/lib/bio/BIOExtensions.rb +89 -0
  37. data/lib/bio/db/alignment.rb +59 -0
  38. data/lib/bio/db/fastadb.rb +255 -0
  39. data/lib/bio/db/pileup.rb +221 -172
  40. data/lib/bio/db/sam.rb +639 -589
  41. data/lib/bio/db/sam/{faidx.rb → faidx_old.rb} +0 -0
  42. data/lib/bio/db/vcf.rb +69 -68
  43. data/test/.gitignore +1 -0
  44. data/test/{test_basic.rb → old_test_basic.rb} +33 -1
  45. data/test/samples/small/dupes.bam +0 -0
  46. data/test/samples/small/dupes.sam +274 -0
  47. data/test/samples/small/map_for_reheader.sam +8 -0
  48. data/test/samples/small/map_to_merge1.bam +0 -0
  49. data/test/samples/small/map_to_merge1.bam.bai +0 -0
  50. data/test/samples/small/map_to_merge1.sam +8 -0
  51. data/test/samples/small/map_to_merge2.bam +0 -0
  52. data/test/samples/small/map_to_merge2.bam.bai +0 -0
  53. data/test/samples/small/map_to_merge2.sam +8 -0
  54. data/test/samples/small/no_md.sam +8 -0
  55. data/test/samples/small/test_chr.fasta.1.bt2 +0 -0
  56. data/test/samples/small/test_chr.fasta.2.bt2 +0 -0
  57. data/test/samples/small/test_chr.fasta.3.bt2 +0 -0
  58. data/test/samples/small/test_chr.fasta.4.bt2 +0 -0
  59. data/test/samples/small/test_chr.fasta.rev.1.bt2 +0 -0
  60. data/test/samples/small/test_chr.fasta.rev.2.bt2 +0 -0
  61. data/test/samples/small/test_cov.svg +273 -0
  62. data/test/samples/small/testu.bam.bai +0 -0
  63. data/test/svg +133 -0
  64. data/test/test_pileup.rb +84 -0
  65. data/test/test_sam.rb +331 -0
  66. data/test/test_vcf.rb +11 -0
  67. data/{doc → tutorial}/tutorial.html +0 -0
  68. data/{doc → tutorial}/tutorial.pdf +0 -0
  69. metadata +56 -114
  70. data/doc/Bio/DB/SAM/Tools/Bam1CoreT.html +0 -159
  71. data/doc/Bio/DB/SAM/Tools/Bam1T.html +0 -220
  72. data/doc/Bio/DB/SAM/Tools/BamHeaderT.html +0 -249
  73. data/doc/Bio/DB/SAM/Tools/BamPileup1T.html +0 -159
  74. data/doc/Bio/DB/SAM/Tools/SamfileT.html +0 -171
  75. data/doc/Bio/DB/SAM/Tools/SamfileTX.html +0 -159
  76. data/doc/Bio/DB/SAMException.html +0 -205
  77. data/doc/LibC.html +0 -155
  78. data/doc/Pileup.html +0 -571
  79. data/doc/Vcf.html +0 -473
  80. data/doc/basic_styles.css +0 -31
  81. data/doc/classes/Bio.html +0 -139
  82. data/doc/classes/Bio/DB.html +0 -137
  83. data/doc/classes/Bio/DB/Alignment.html +0 -441
  84. data/doc/classes/Bio/DB/Alignment.src/M000012.html +0 -19
  85. data/doc/classes/Bio/DB/Alignment.src/M000013.html +0 -27
  86. data/doc/classes/Bio/DB/Alignment.src/M000014.html +0 -45
  87. data/doc/classes/Bio/DB/Alignment.src/M000015.html +0 -40
  88. data/doc/classes/Bio/DB/SAM.html +0 -510
  89. data/doc/classes/Bio/DB/SAM/Library.html +0 -135
  90. data/doc/classes/Bio/DB/SAM/Library.src/M000006.html +0 -28
  91. data/doc/classes/Bio/DB/SAM/Tools.html +0 -278
  92. data/doc/classes/Bio/DB/SAM/Tools.src/M000007.html +0 -20
  93. data/doc/classes/Bio/DB/SAM/Tools/Bam1CoreT.html +0 -111
  94. data/doc/classes/Bio/DB/SAM/Tools/Bam1T.html +0 -150
  95. data/doc/classes/Bio/DB/SAM/Tools/Bam1T.src/M000010.html +0 -20
  96. data/doc/classes/Bio/DB/SAM/Tools/BamHeaderT.html +0 -169
  97. data/doc/classes/Bio/DB/SAM/Tools/BamHeaderT.src/M000008.html +0 -19
  98. data/doc/classes/Bio/DB/SAM/Tools/BamHeaderT.src/M000009.html +0 -18
  99. data/doc/classes/Bio/DB/SAM/Tools/BamPileup1T.html +0 -111
  100. data/doc/classes/Bio/DB/SAM/Tools/SamfileT.html +0 -129
  101. data/doc/classes/Bio/DB/SAM/Tools/SamfileTX.html +0 -111
  102. data/doc/classes/Bio/DB/SAMException.html +0 -140
  103. data/doc/classes/Bio/DB/SAMException.src/M000016.html +0 -18
  104. data/doc/classes/Bio/DB/Sam.src/M000017.html +0 -43
  105. data/doc/classes/Bio/DB/Sam.src/M000018.html +0 -42
  106. data/doc/classes/Bio/DB/Sam.src/M000019.html +0 -18
  107. data/doc/classes/Bio/DB/Sam.src/M000020.html +0 -22
  108. data/doc/classes/Bio/DB/Sam.src/M000021.html +0 -19
  109. data/doc/classes/Bio/DB/Sam.src/M000022.html +0 -25
  110. data/doc/classes/Bio/DB/Sam.src/M000023.html +0 -28
  111. data/doc/classes/Bio/DB/Sam.src/M000024.html +0 -28
  112. data/doc/classes/Bio/DB/Sam.src/M000025.html +0 -46
  113. data/doc/classes/Bio/DB/Sam.src/M000026.html +0 -24
  114. data/doc/classes/Bio/DB/Sam.src/M000027.html +0 -19
  115. data/doc/classes/Bio/DB/Sam.src/M000028.html +0 -24
  116. data/doc/classes/Bio/DB/Sam.src/M000029.html +0 -41
  117. data/doc/classes/Bio/DB/Sam.src/M000030.html +0 -31
  118. data/doc/classes/Bio/DB/Sam.src/M000031.html +0 -86
  119. data/doc/classes/Bio/DB/Sam.src/M000032.html +0 -34
  120. data/doc/classes/Bio/DB/Tag.html +0 -160
  121. data/doc/classes/Bio/DB/Tag.src/M000011.html +0 -21
  122. data/doc/classes/LibC.html +0 -105
  123. data/doc/classes/Pileup.html +0 -374
  124. data/doc/classes/Pileup.src/M000001.html +0 -34
  125. data/doc/classes/Pileup.src/M000002.html +0 -21
  126. data/doc/classes/Pileup.src/M000003.html +0 -21
  127. data/doc/classes/Pileup.src/M000004.html +0 -21
  128. data/doc/classes/Pileup.src/M000005.html +0 -31
  129. data/doc/files/lib/bio-samtools_rb.html +0 -109
  130. data/doc/files/lib/bio/db/sam/bam_rb.html +0 -108
  131. data/doc/files/lib/bio/db/sam/faidx_rb.html +0 -108
  132. data/doc/files/lib/bio/db/sam/library_rb.html +0 -101
  133. data/doc/files/lib/bio/db/sam/pileup_rb.html +0 -178
  134. data/doc/files/lib/bio/db/sam/sam_rb.html +0 -113
  135. data/doc/files/lib/bio/db/sam_rb.html +0 -111
  136. data/doc/fr_class_index.html +0 -43
  137. data/doc/fr_file_index.html +0 -33
  138. data/doc/fr_method_index.html +0 -58
  139. data/doc/lib/bio-samtools_rb.html +0 -115
  140. data/doc/lib/bio/db/pileup_rb.html +0 -171
  141. data/doc/lib/bio/db/sam/bam_rb.html +0 -121
  142. data/doc/lib/bio/db/sam/faidx_rb.html +0 -117
  143. data/doc/lib/bio/db/sam/library_rb.html +0 -115
  144. data/doc/lib/bio/db/sam/pileup_rb.html +0 -171
  145. data/doc/lib/bio/db/sam/sam_rb.html +0 -121
  146. data/doc/lib/bio/db/sam/vcf_rb.html +0 -124
  147. data/doc/lib/bio/db/sam_rb.html +0 -115
  148. data/doc/lib/bio/db/vcf_rb.html +0 -124
  149. data/doc/rdoc-style.css +0 -208
  150. data/lib/bio/db/sam/bam.rb +0 -210
  151. data/lib/bio/db/sam/sam.rb +0 -86
  152. data/test/samples/pipe_char/test.bam +0 -0
  153. data/test/samples/pipe_char/test.bam.bai +0 -0
  154. data/test/samples/pipe_char/test.tam +0 -10
  155. data/test/samples/pipe_char/test_chr.fasta +0 -1000
  156. data/test/samples/pipe_char/test_chr.fasta.fai +0 -1
  157. data/test/samples/small/test +0 -0
  158. data/test/samples/small/test.bam +0 -0
  159. data/test/samples/small/test.fa +0 -20
  160. data/test/samples/small/test.fai +0 -0
@@ -1,205 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
-
7
- <title>class Bio::DB::SAMException - 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.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">RuntimeError
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
- </ul>
76
- </nav>
77
-
78
- </div>
79
-
80
- <div id="project-metadata">
81
- <nav id="fileindex-section" class="section project-section">
82
- <h3 class="section-header">Pages</h3>
83
-
84
- <ul>
85
-
86
- <li class="file"><a href="../../LICENSE_txt.html">LICENSE</a>
87
-
88
- </ul>
89
- </nav>
90
-
91
- <nav id="classindex-section" class="section project-section">
92
- <h3 class="section-header">Class and Module Index</h3>
93
-
94
- <ul class="link-list">
95
-
96
- <li><a href="../../Bio.html">Bio</a>
97
-
98
- <li><a href="../../Bio/DB.html">Bio::DB</a>
99
-
100
- <li><a href="../../Bio/DB/Alignment.html">Bio::DB::Alignment</a>
101
-
102
- <li><a href="../../Bio/DB/Pileup.html">Bio::DB::Pileup</a>
103
-
104
- <li><a href="../../Bio/DB/SAM.html">Bio::DB::SAM</a>
105
-
106
- <li><a href="../../Bio/DB/SAM/Library.html">Bio::DB::SAM::Library</a>
107
-
108
- <li><a href="../../Bio/DB/SAM/Tools.html">Bio::DB::SAM::Tools</a>
109
-
110
- <li><a href="../../Bio/DB/SAM/Tools/Bam1CoreT.html">Bio::DB::SAM::Tools::Bam1CoreT</a>
111
-
112
- <li><a href="../../Bio/DB/SAM/Tools/Bam1T.html">Bio::DB::SAM::Tools::Bam1T</a>
113
-
114
- <li><a href="../../Bio/DB/SAM/Tools/BamHeaderT.html">Bio::DB::SAM::Tools::BamHeaderT</a>
115
-
116
- <li><a href="../../Bio/DB/SAM/Tools/BamPileup1T.html">Bio::DB::SAM::Tools::BamPileup1T</a>
117
-
118
- <li><a href="../../Bio/DB/SAM/Tools/SamfileT.html">Bio::DB::SAM::Tools::SamfileT</a>
119
-
120
- <li><a href="../../Bio/DB/SAM/Tools/SamfileTX.html">Bio::DB::SAM::Tools::SamfileTX</a>
121
-
122
- <li><a href="../../Bio/DB/SAMException.html">Bio::DB::SAMException</a>
123
-
124
- <li><a href="../../Bio/DB/Sam.html">Bio::DB::Sam</a>
125
-
126
- <li><a href="../../Bio/DB/Tag.html">Bio::DB::Tag</a>
127
-
128
- <li><a href="../../Bio/DB/Vcf.html">Bio::DB::Vcf</a>
129
-
130
- <li><a href="../../LibC.html">LibC</a>
131
-
132
- </ul>
133
- </nav>
134
-
135
- </div>
136
- </nav>
137
-
138
- <div id="documentation">
139
- <h1 class="class">class Bio::DB::SAMException</h1>
140
-
141
- <div id="description" class="description">
142
-
143
- </div><!-- description -->
144
-
145
-
146
-
147
-
148
- <section id="5Buntitled-5D" class="documentation-section">
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
- <!-- Methods -->
158
-
159
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
160
- <h3 class="section-header">Public Class Methods</h3>
161
-
162
-
163
- <div id="method-c-new" class="method-detail ">
164
-
165
- <div class="method-heading">
166
- <span class="method-name">new</span><span
167
- class="method-args">()</span>
168
- <span class="method-click-advice">click to toggle source</span>
169
- </div>
170
-
171
-
172
- <div class="method-description">
173
-
174
- <p>we can add further variables to give information of the excpetion</p>
175
-
176
-
177
-
178
- <div class="method-source-code" id="new-source">
179
- <pre><span class="ruby-comment"># File lib/bio/db/sam.rb, line 645</span>
180
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>()
181
-
182
- <span class="ruby-keyword">end</span></pre>
183
- </div><!-- new-source -->
184
-
185
- </div>
186
-
187
-
188
-
189
-
190
- </div><!-- new-method -->
191
-
192
-
193
- </section><!-- public-class-method-details -->
194
-
195
- </section><!-- 5Buntitled-5D -->
196
-
197
- </div><!-- documentation -->
198
-
199
-
200
- <footer id="validator-badges">
201
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
202
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
203
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
204
- </footer>
205
-
@@ -1,155 +0,0 @@
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 - 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="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/Pileup.html">Bio::DB::Pileup</a>
87
-
88
- <li><a href="./Bio/DB/SAM.html">Bio::DB::SAM</a>
89
-
90
- <li><a href="./Bio/DB/SAM/Library.html">Bio::DB::SAM::Library</a>
91
-
92
- <li><a href="./Bio/DB/SAM/Tools.html">Bio::DB::SAM::Tools</a>
93
-
94
- <li><a href="./Bio/DB/SAM/Tools/Bam1CoreT.html">Bio::DB::SAM::Tools::Bam1CoreT</a>
95
-
96
- <li><a href="./Bio/DB/SAM/Tools/Bam1T.html">Bio::DB::SAM::Tools::Bam1T</a>
97
-
98
- <li><a href="./Bio/DB/SAM/Tools/BamHeaderT.html">Bio::DB::SAM::Tools::BamHeaderT</a>
99
-
100
- <li><a href="./Bio/DB/SAM/Tools/BamPileup1T.html">Bio::DB::SAM::Tools::BamPileup1T</a>
101
-
102
- <li><a href="./Bio/DB/SAM/Tools/SamfileT.html">Bio::DB::SAM::Tools::SamfileT</a>
103
-
104
- <li><a href="./Bio/DB/SAM/Tools/SamfileTX.html">Bio::DB::SAM::Tools::SamfileTX</a>
105
-
106
- <li><a href="./Bio/DB/SAMException.html">Bio::DB::SAMException</a>
107
-
108
- <li><a href="./Bio/DB/Sam.html">Bio::DB::Sam</a>
109
-
110
- <li><a href="./Bio/DB/Tag.html">Bio::DB::Tag</a>
111
-
112
- <li><a href="./Bio/DB/Vcf.html">Bio::DB::Vcf</a>
113
-
114
- <li><a href="./LibC.html">LibC</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
- <p>require ‘bio/db/pileup’ require ‘bio/db/vcf’</p>
128
-
129
- </div><!-- description -->
130
-
131
-
132
-
133
-
134
- <section id="5Buntitled-5D" class="documentation-section">
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
- <!-- Methods -->
144
-
145
- </section><!-- 5Buntitled-5D -->
146
-
147
- </div><!-- documentation -->
148
-
149
-
150
- <footer id="validator-badges">
151
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
152
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
153
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
154
- </footer>
155
-
@@ -1,571 +0,0 @@
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
-