bio-gngm 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bio-gngm.gemspec +7 -3
- data/doc/Bio.html +4 -2
- data/doc/Bio/DB.html +4 -2
- data/doc/Bio/DB/FastaLengthDB.html +238 -0
- data/doc/Bio/DB/Pileup.html +10 -9
- data/doc/Bio/DB/Vcf.html +52 -102
- data/doc/Bio/Util.html +4 -2
- data/doc/Bio/Util/Gngm.html +318 -72
- data/doc/LICENSE_txt.html +12 -9
- data/doc/created.rid +3 -3
- data/doc/index.html +3 -1
- data/doc/js/search_index.js +1 -1
- data/doc/lib/bio-gngm_rb.html +2 -0
- data/doc/lib/bio/util/bio-gngm_rb.html +2 -0
- data/doc/table_of_contents.html +20 -7
- data/examples/Chr1.html +1483 -0
- data/examples/gngm_qtl_mapping_HTML_maker_set_options.rb +243 -0
- data/examples/pileup.txt +22 -0
- data/examples/snps.vcf +22 -0
- data/lib/bio-gngm.rb +0 -1
- data/lib/bio/util/bio-gngm.rb +100 -38
- data/test/test_bio-gngm.rb +1 -1
- metadata +30 -26
- data/lib/bio/util/mutation_effects.rb +0 -39
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/bio-gngm.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bio-gngm"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dan MacLean"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-12-06"
|
13
13
|
s.description = "Identify causative mutations in a model genome from NGS reads using the NGM method."
|
14
14
|
s.email = "maclean.daniel@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"bio-gngm.gemspec",
|
28
28
|
"doc/Bio.html",
|
29
29
|
"doc/Bio/DB.html",
|
30
|
+
"doc/Bio/DB/FastaLengthDB.html",
|
30
31
|
"doc/Bio/DB/Pileup.html",
|
31
32
|
"doc/Bio/DB/Vcf.html",
|
32
33
|
"doc/Bio/Util.html",
|
@@ -83,13 +84,16 @@ Gem::Specification.new do |s|
|
|
83
84
|
"doc/rdoc.css",
|
84
85
|
"doc/table_of_contents.html",
|
85
86
|
"examples/.DS_Store",
|
87
|
+
"examples/Chr1.html",
|
88
|
+
"examples/gngm_qtl_mapping_HTML_maker_set_options.rb",
|
86
89
|
"examples/make_histograms.rb",
|
87
90
|
"examples/make_threads.rb",
|
88
91
|
"examples/make_threads_isize.rb",
|
92
|
+
"examples/pileup.txt",
|
93
|
+
"examples/snps.vcf",
|
89
94
|
"examples/use_indels.rb",
|
90
95
|
"lib/bio-gngm.rb",
|
91
96
|
"lib/bio/util/bio-gngm.rb",
|
92
|
-
"lib/bio/util/mutation_effects.rb",
|
93
97
|
"scripts/get_subseq.rb",
|
94
98
|
"scripts/make_histograms_laerfyve.rb",
|
95
99
|
"scripts/make_histograms_laerfyve_stitched.rb",
|
data/doc/Bio.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
6
|
|
7
|
-
<title>
|
7
|
+
<title>module Bio - RDoc Documentation</title>
|
8
8
|
|
9
9
|
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
10
|
|
@@ -81,6 +81,8 @@
|
|
81
81
|
|
82
82
|
<li><a href="./Bio/DB.html">Bio::DB</a>
|
83
83
|
|
84
|
+
<li><a href="./Bio/DB/FastaLengthDB.html">Bio::DB::FastaLengthDB</a>
|
85
|
+
|
84
86
|
<li><a href="./Bio/DB/Pileup.html">Bio::DB::Pileup</a>
|
85
87
|
|
86
88
|
<li><a href="./Bio/DB/Vcf.html">Bio::DB::Vcf</a>
|
@@ -123,7 +125,7 @@
|
|
123
125
|
|
124
126
|
<footer id="validator-badges">
|
125
127
|
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
126
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.
|
128
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
127
129
|
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
128
130
|
</footer>
|
129
131
|
|
data/doc/Bio/DB.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
6
|
|
7
|
-
<title>
|
7
|
+
<title>module Bio::DB - RDoc Documentation</title>
|
8
8
|
|
9
9
|
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
10
|
|
@@ -80,6 +80,8 @@
|
|
80
80
|
|
81
81
|
<li><a href="../Bio/DB.html">Bio::DB</a>
|
82
82
|
|
83
|
+
<li><a href="../Bio/DB/FastaLengthDB.html">Bio::DB::FastaLengthDB</a>
|
84
|
+
|
83
85
|
<li><a href="../Bio/DB/Pileup.html">Bio::DB::Pileup</a>
|
84
86
|
|
85
87
|
<li><a href="../Bio/DB/Vcf.html">Bio::DB::Vcf</a>
|
@@ -122,7 +124,7 @@
|
|
122
124
|
|
123
125
|
<footer id="validator-badges">
|
124
126
|
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
125
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.
|
127
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
126
128
|
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
127
129
|
</footer>
|
128
130
|
|
@@ -0,0 +1,238 @@
|
|
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::FastaLengthDB - RDoc Documentation</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/util/bio-gngm.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-each">#each</a>
|
76
|
+
|
77
|
+
</ul>
|
78
|
+
</nav>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
<div id="project-metadata">
|
83
|
+
<nav id="fileindex-section" class="section project-section">
|
84
|
+
<h3 class="section-header">Pages</h3>
|
85
|
+
|
86
|
+
<ul>
|
87
|
+
|
88
|
+
<li class="file"><a href="../../LICENSE_txt.html">LICENSE</a>
|
89
|
+
|
90
|
+
</ul>
|
91
|
+
</nav>
|
92
|
+
|
93
|
+
<nav id="classindex-section" class="section project-section">
|
94
|
+
<h3 class="section-header">Class and Module Index</h3>
|
95
|
+
|
96
|
+
<ul class="link-list">
|
97
|
+
|
98
|
+
<li><a href="../../Bio.html">Bio</a>
|
99
|
+
|
100
|
+
<li><a href="../../Bio/DB.html">Bio::DB</a>
|
101
|
+
|
102
|
+
<li><a href="../../Bio/DB/FastaLengthDB.html">Bio::DB::FastaLengthDB</a>
|
103
|
+
|
104
|
+
<li><a href="../../Bio/DB/Pileup.html">Bio::DB::Pileup</a>
|
105
|
+
|
106
|
+
<li><a href="../../Bio/DB/Vcf.html">Bio::DB::Vcf</a>
|
107
|
+
|
108
|
+
<li><a href="../../Bio/Util.html">Bio::Util</a>
|
109
|
+
|
110
|
+
<li><a href="../../Bio/Util/Gngm.html">Bio::Util::Gngm</a>
|
111
|
+
|
112
|
+
</ul>
|
113
|
+
</nav>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</nav>
|
117
|
+
|
118
|
+
<div id="documentation">
|
119
|
+
<h1 class="class">class Bio::DB::FastaLengthDB</h1>
|
120
|
+
|
121
|
+
<div id="description" class="description">
|
122
|
+
|
123
|
+
<p>Simple class representing a file of Fasta format sequences and each ones
|
124
|
+
length</p>
|
125
|
+
|
126
|
+
</div><!-- description -->
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<!-- Methods -->
|
141
|
+
|
142
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
143
|
+
<h3 class="section-header">Public Class Methods</h3>
|
144
|
+
|
145
|
+
|
146
|
+
<div id="method-c-new" class="method-detail ">
|
147
|
+
|
148
|
+
<div class="method-heading">
|
149
|
+
<span class="method-name">new</span><span
|
150
|
+
class="method-args">(args)</span>
|
151
|
+
<span class="method-click-advice">click to toggle source</span>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
|
155
|
+
<div class="method-description">
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<div class="method-source-code" id="new-source">
|
162
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 20</span>
|
163
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
|
164
|
+
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:file</span>]
|
165
|
+
<span class="ruby-ivar">@seqs</span> = {}
|
166
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">FastaFormat</span>.<span class="ruby-identifier">open</span>(<span class="ruby-ivar">@file</span>)
|
167
|
+
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>
|
168
|
+
<span class="ruby-ivar">@seqs</span>[<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">entry_id</span>] = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">length</span>
|
169
|
+
<span class="ruby-keyword">end</span>
|
170
|
+
|
171
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>
|
172
|
+
<span class="ruby-ivar">@seqs</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
173
|
+
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">k</span>, <span class="ruby-ivar">@seqs</span>[<span class="ruby-identifier">k</span>]
|
174
|
+
<span class="ruby-keyword">end</span>
|
175
|
+
<span class="ruby-keyword">end</span>
|
176
|
+
|
177
|
+
<span class="ruby-keyword">end</span></pre>
|
178
|
+
</div><!-- new-source -->
|
179
|
+
|
180
|
+
</div>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</div><!-- new-method -->
|
186
|
+
|
187
|
+
|
188
|
+
</section><!-- public-class-method-details -->
|
189
|
+
|
190
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
191
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
192
|
+
|
193
|
+
|
194
|
+
<div id="method-i-each" class="method-detail ">
|
195
|
+
|
196
|
+
<div class="method-heading">
|
197
|
+
<span class="method-name">each</span><span
|
198
|
+
class="method-args">() { |k, seqs| ... }</span>
|
199
|
+
<span class="method-click-advice">click to toggle source</span>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
|
203
|
+
<div class="method-description">
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<div class="method-source-code" id="each-source">
|
210
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 28</span>
|
211
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>
|
212
|
+
<span class="ruby-ivar">@seqs</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
213
|
+
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">k</span>, <span class="ruby-ivar">@seqs</span>[<span class="ruby-identifier">k</span>]
|
214
|
+
<span class="ruby-keyword">end</span>
|
215
|
+
<span class="ruby-keyword">end</span></pre>
|
216
|
+
</div><!-- each-source -->
|
217
|
+
|
218
|
+
</div>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</div><!-- each-method -->
|
224
|
+
|
225
|
+
|
226
|
+
</section><!-- public-instance-method-details -->
|
227
|
+
|
228
|
+
</section><!-- 5Buntitled-5D -->
|
229
|
+
|
230
|
+
</div><!-- documentation -->
|
231
|
+
|
232
|
+
|
233
|
+
<footer id="validator-badges">
|
234
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
235
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
236
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
237
|
+
</footer>
|
238
|
+
|
data/doc/Bio/DB/Pileup.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
6
|
|
7
|
-
<title>
|
7
|
+
<title>class Bio::DB::Pileup - RDoc Documentation</title>
|
8
8
|
|
9
9
|
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
|
10
10
|
|
@@ -99,6 +99,8 @@
|
|
99
99
|
|
100
100
|
<li><a href="../../Bio/DB.html">Bio::DB</a>
|
101
101
|
|
102
|
+
<li><a href="../../Bio/DB/FastaLengthDB.html">Bio::DB::FastaLengthDB</a>
|
103
|
+
|
102
104
|
<li><a href="../../Bio/DB/Pileup.html">Bio::DB::Pileup</a>
|
103
105
|
|
104
106
|
<li><a href="../../Bio/DB/Vcf.html">Bio::DB::Vcf</a>
|
@@ -227,7 +229,7 @@ is compared to the next most common base after it.
|
|
227
229
|
|
228
230
|
|
229
231
|
<div class="method-source-code" id="discordant_chastity-source">
|
230
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
232
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 56</span>
|
231
233
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">discordant_chastity</span>
|
232
234
|
<span class="ruby-identifier">arr</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">non_refs</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">sort</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">last</span> }
|
233
235
|
<span class="ruby-ivar">@top_non_ref_count</span>, <span class="ruby-ivar">@second_non_ref_count</span>, <span class="ruby-ivar">@third_non_ref_count</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">last</span>}
|
@@ -282,13 +284,12 @@ reference base is N or n if <code>:ignore_reference_n</code> is set to true</p>
|
|
282
284
|
|
283
285
|
|
284
286
|
<div class="method-source-code" id="is_snp-3F-source">
|
285
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
287
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 78</span>
|
286
288
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_snp?</span>(<span class="ruby-identifier">opts</span>)
|
287
|
-
<span class="ruby-keyword">
|
288
|
-
|
289
|
-
<span class="ruby-keyword">
|
290
|
-
|
291
|
-
<span class="ruby-keyword">end</span>
|
289
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref_base</span> <span class="ruby-operator">==</span> <span class="ruby-string">'*'</span>
|
290
|
+
<span class="ruby-comment">#return false unless is_ct</span>
|
291
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:ignore_reference_n</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref_base</span> <span class="ruby-operator">==</span> <span class="ruby-string">"N"</span> <span class="ruby-keyword">or</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref_base</span> <span class="ruby-operator">==</span> <span class="ruby-string">"n"</span>
|
292
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">coverage</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:min_depth</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">non_ref_count</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:min_non_ref_count</span>]
|
292
293
|
<span class="ruby-keyword">false</span>
|
293
294
|
<span class="ruby-keyword">end</span></pre>
|
294
295
|
</div><!-- is_snp-3F-source -->
|
@@ -310,7 +311,7 @@ reference base is N or n if <code>:ignore_reference_n</code> is set to true</p>
|
|
310
311
|
|
311
312
|
<footer id="validator-badges">
|
312
313
|
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
313
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.
|
314
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
314
315
|
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
315
316
|
</footer>
|
316
317
|
|
data/doc/Bio/DB/Vcf.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
6
|
|
7
|
-
<title>
|
7
|
+
<title>class Bio::DB::Vcf - RDoc Documentation</title>
|
8
8
|
|
9
9
|
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
|
10
10
|
|
@@ -74,13 +74,11 @@
|
|
74
74
|
|
75
75
|
<li><a href="#method-i-gq">#gq</a>
|
76
76
|
|
77
|
-
<li><a href="#method-i-has_just_one_variant-3F">#has_just_one_variant?</a>
|
78
|
-
|
79
|
-
<li><a href="#method-i-is_deletion-3F">#is_deletion?</a>
|
80
|
-
|
81
77
|
<li><a href="#method-i-is_indel-3F">#is_indel?</a>
|
82
78
|
|
83
|
-
<li><a href="#method-i-
|
79
|
+
<li><a href="#method-i-is_mnp-3F">#is_mnp?</a>
|
80
|
+
|
81
|
+
<li><a href="#method-i-is_snp-3F">#is_snp?</a>
|
84
82
|
|
85
83
|
<li><a href="#method-i-mq">#mq</a>
|
86
84
|
|
@@ -123,6 +121,8 @@
|
|
123
121
|
|
124
122
|
<li><a href="../../Bio/DB.html">Bio::DB</a>
|
125
123
|
|
124
|
+
<li><a href="../../Bio/DB/FastaLengthDB.html">Bio::DB::FastaLengthDB</a>
|
125
|
+
|
126
126
|
<li><a href="../../Bio/DB/Pileup.html">Bio::DB::Pileup</a>
|
127
127
|
|
128
128
|
<li><a href="../../Bio/DB/Vcf.html">Bio::DB::Vcf</a>
|
@@ -198,7 +198,7 @@ attribute string on commas</p>
|
|
198
198
|
|
199
199
|
|
200
200
|
<div class="method-source-code" id="alternatives-source">
|
201
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
201
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 123</span>
|
202
202
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">alternatives</span>
|
203
203
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">alt</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">","</span>) <span class="ruby-keyword">rescue</span> []
|
204
204
|
<span class="ruby-keyword">end</span></pre>
|
@@ -230,7 +230,7 @@ href="Vcf.html">Vcf</a> only.</p>
|
|
230
230
|
|
231
231
|
|
232
232
|
<div class="method-source-code" id="gq-source">
|
233
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
233
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 146</span>
|
234
234
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">gq</span>
|
235
235
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">samples</span>[<span class="ruby-string">"1"</span>][<span class="ruby-string">"GQ"</span>].<span class="ruby-identifier">to_f</span> <span class="ruby-keyword">rescue</span> <span class="ruby-value">0.0</span>
|
236
236
|
<span class="ruby-keyword">end</span></pre>
|
@@ -244,41 +244,42 @@ href="Vcf.html">Vcf</a> only.</p>
|
|
244
244
|
</div><!-- gq-method -->
|
245
245
|
|
246
246
|
|
247
|
-
<div id="method-i-
|
247
|
+
<div id="method-i-is_indel-3F" class="method-detail ">
|
248
248
|
|
249
249
|
<div class="method-heading">
|
250
|
-
<span class="method-name">
|
251
|
-
class="method-args">()</span>
|
250
|
+
<span class="method-name">is_indel?</span><span
|
251
|
+
class="method-args">(options)</span>
|
252
252
|
<span class="method-click-advice">click to toggle source</span>
|
253
253
|
</div>
|
254
254
|
|
255
255
|
|
256
256
|
<div class="method-description">
|
257
257
|
|
258
|
-
<p>Returns true if
|
259
|
-
|
258
|
+
<p>Returns true if ref col is different in length from any of the entries in
|
259
|
+
alt column</p>
|
260
260
|
|
261
261
|
|
262
262
|
|
263
|
-
<div class="method-source-code" id="
|
264
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
265
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">
|
266
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">alternatives</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator"
|
263
|
+
<div class="method-source-code" id="is_indel-3F-source">
|
264
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 186</span>
|
265
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_indel?</span>(<span class="ruby-identifier">options</span>)
|
266
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">variant?</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">alternatives</span>.<span class="ruby-identifier">any?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">length</span>} <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pass_quality?</span>(<span class="ruby-identifier">options</span>)
|
267
|
+
<span class="ruby-keyword">false</span>
|
267
268
|
<span class="ruby-keyword">end</span></pre>
|
268
|
-
</div><!--
|
269
|
+
</div><!-- is_indel-3F-source -->
|
269
270
|
|
270
271
|
</div>
|
271
272
|
|
272
273
|
|
273
274
|
|
274
275
|
|
275
|
-
</div><!--
|
276
|
+
</div><!-- is_indel-3F-method -->
|
276
277
|
|
277
278
|
|
278
|
-
<div id="method-i-
|
279
|
+
<div id="method-i-is_mnp-3F" class="method-detail ">
|
279
280
|
|
280
281
|
<div class="method-heading">
|
281
|
-
<span class="method-name">
|
282
|
+
<span class="method-name">is_mnp?</span><span
|
282
283
|
class="method-args">(options)</span>
|
283
284
|
<span class="method-click-advice">click to toggle source</span>
|
284
285
|
</div>
|
@@ -286,107 +287,56 @@ one allele are too complicated for now, so are discarded…</p>
|
|
286
287
|
|
287
288
|
<div class="method-description">
|
288
289
|
|
289
|
-
<p>
|
290
|
-
|
291
|
-
href="Vcf.html#method-i-pass_quality-3F">#pass_quality?</a> is true. Looks
|
292
|
-
only at the positions that are predicted simple deletions, any positions
|
293
|
-
where the alt alleles includes more than one deletion or a SNP or an
|
294
|
-
insertion also is ignored.</p>
|
290
|
+
<p>returns true if ref col has same length as all alternatives and position
|
291
|
+
variant passes quality</p>
|
295
292
|
|
296
293
|
|
297
294
|
|
298
|
-
<div class="method-source-code" id="
|
299
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
300
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">
|
301
|
-
<span class="ruby-keyword">
|
302
|
-
<span class="ruby-keyword">when</span> (<span class="ruby-keyword">not</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">has_just_one_variant?</span>) <span class="ruby-keyword">then</span> <span class="ruby-keyword">false</span>
|
303
|
-
<span class="ruby-keyword">when</span> ( <span class="ruby-keyword">self</span>.<span class="ruby-identifier">alt</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator"><</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">length</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pass_quality?</span>(<span class="ruby-identifier">options</span>) ) <span class="ruby-keyword">then</span> <span class="ruby-keyword">true</span>
|
304
|
-
<span class="ruby-keyword">else</span> <span class="ruby-keyword">false</span>
|
305
|
-
<span class="ruby-keyword">end</span>
|
306
|
-
<span class="ruby-keyword">rescue</span> <span class="ruby-comment">## if something goes wrong, skip the postion, </span>
|
295
|
+
<div class="method-source-code" id="is_mnp-3F-source">
|
296
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 174</span>
|
297
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_mnp?</span>(<span class="ruby-identifier">options</span>)
|
298
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">alternatives</span>.<span class="ruby-identifier">all?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">length</span>} <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pass_quality?</span>(<span class="ruby-identifier">options</span>)
|
307
299
|
<span class="ruby-keyword">false</span>
|
308
300
|
<span class="ruby-keyword">end</span></pre>
|
309
|
-
</div><!--
|
301
|
+
</div><!-- is_mnp-3F-source -->
|
310
302
|
|
311
303
|
</div>
|
312
304
|
|
313
305
|
|
314
306
|
|
315
307
|
|
316
|
-
</div><!--
|
308
|
+
</div><!-- is_mnp-3F-method -->
|
317
309
|
|
318
310
|
|
319
|
-
<div id="method-i-
|
311
|
+
<div id="method-i-is_snp-3F" class="method-detail ">
|
320
312
|
|
321
313
|
<div class="method-heading">
|
322
|
-
<span class="method-name">
|
323
|
-
class="method-args">(
|
314
|
+
<span class="method-name">is_snp?</span><span
|
315
|
+
class="method-args">(options)</span>
|
324
316
|
<span class="method-click-advice">click to toggle source</span>
|
325
317
|
</div>
|
326
318
|
|
327
319
|
|
328
320
|
<div class="method-description">
|
329
321
|
|
330
|
-
<p>
|
331
|
-
href="Vcf.html#method-i-is_insertion-3F">#is_insertion?</a> or <a
|
332
|
-
href="Vcf.html#method-i-is_deletion-3F">#is_deletion?</a> is true</p>
|
322
|
+
<p>returns true if ref col has length of 1 and is_mnp?</p>
|
333
323
|
|
334
324
|
|
335
325
|
|
336
|
-
<div class="method-source-code" id="
|
337
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
338
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">
|
339
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">
|
340
|
-
<span class="ruby-keyword">
|
341
|
-
</div><!-- is_indel-3F-source -->
|
342
|
-
|
343
|
-
</div>
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
</div><!-- is_indel-3F-method -->
|
349
|
-
|
350
|
-
|
351
|
-
<div id="method-i-is_insertion-3F" class="method-detail ">
|
352
|
-
|
353
|
-
<div class="method-heading">
|
354
|
-
<span class="method-name">is_insertion?</span><span
|
355
|
-
class="method-args">(options)</span>
|
356
|
-
<span class="method-click-advice">click to toggle source</span>
|
357
|
-
</div>
|
358
|
-
|
359
|
-
|
360
|
-
<div class="method-description">
|
361
|
-
|
362
|
-
<p>Returns true if the length of the alt column is greater than that of the
|
363
|
-
ref column in the <a href="Vcf.html">Vcf</a> and if <a
|
364
|
-
href="Vcf.html#method-i-pass_quality-3F">#pass_quality?</a> is true. Looks
|
365
|
-
only at the positions that are predicted simple deletions, any positions
|
366
|
-
where the alt alleles includes more than one deletion or a SNP or an
|
367
|
-
insertion also is ignored.</p>
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
<div class="method-source-code" id="is_insertion-3F-source">
|
372
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 165</span>
|
373
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_insertion?</span>(<span class="ruby-identifier">options</span>)
|
374
|
-
<span class="ruby-keyword">case</span>
|
375
|
-
<span class="ruby-keyword">when</span> (<span class="ruby-keyword">not</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">has_just_one_variant?</span>) <span class="ruby-keyword">then</span> <span class="ruby-keyword">false</span>
|
376
|
-
<span class="ruby-keyword">when</span> ( <span class="ruby-keyword">self</span>.<span class="ruby-identifier">alt</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">length</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pass_quality?</span>(<span class="ruby-identifier">options</span>) ) <span class="ruby-keyword">then</span> <span class="ruby-keyword">true</span>
|
377
|
-
<span class="ruby-keyword">else</span> <span class="ruby-keyword">false</span>
|
378
|
-
<span class="ruby-keyword">end</span>
|
379
|
-
<span class="ruby-keyword">rescue</span> <span class="ruby-comment">## if something goes wrong, skip the postion, </span>
|
380
|
-
<span class="ruby-keyword">false</span>
|
326
|
+
<div class="method-source-code" id="is_snp-3F-source">
|
327
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 180</span>
|
328
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_snp?</span>(<span class="ruby-identifier">options</span>)
|
329
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">is_mnp?</span>(<span class="ruby-identifier">options</span>) <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
330
|
+
<span class="ruby-keyword">false</span>
|
381
331
|
<span class="ruby-keyword">end</span></pre>
|
382
|
-
</div><!--
|
332
|
+
</div><!-- is_snp-3F-source -->
|
383
333
|
|
384
334
|
</div>
|
385
335
|
|
386
336
|
|
387
337
|
|
388
338
|
|
389
|
-
</div><!--
|
339
|
+
</div><!-- is_snp-3F-method -->
|
390
340
|
|
391
341
|
|
392
342
|
<div id="method-i-mq" class="method-detail ">
|
@@ -406,7 +356,7 @@ defined by the <a href="Vcf.html">Vcf</a> MQ attribute.</p>
|
|
406
356
|
|
407
357
|
|
408
358
|
<div class="method-source-code" id="mq-source">
|
409
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
359
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 141</span>
|
410
360
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">mq</span>
|
411
361
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">info</span>[<span class="ruby-string">"MQ"</span>].<span class="ruby-identifier">to_f</span> <span class="ruby-keyword">rescue</span> <span class="ruby-value">0.0</span>
|
412
362
|
<span class="ruby-keyword">end</span></pre>
|
@@ -437,7 +387,7 @@ of the last two figures in the DP4 attribute.</p>
|
|
437
387
|
|
438
388
|
|
439
389
|
<div class="method-source-code" id="non_ref_allele_count-source">
|
440
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
390
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 128</span>
|
441
391
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">non_ref_allele_count</span>
|
442
392
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">info</span>[<span class="ruby-string">"DP4"</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">","</span>)[<span class="ruby-value">2</span><span class="ruby-operator">..</span><span class="ruby-value">3</span>].<span class="ruby-identifier">inject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>,<span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">sum</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">to_f</span> } <span class="ruby-keyword">rescue</span> <span class="ruby-value">0.0</span>
|
443
393
|
<span class="ruby-keyword">end</span></pre>
|
@@ -472,7 +422,7 @@ the genotype call,</p>
|
|
472
422
|
|
473
423
|
|
474
424
|
<div class="method-source-code" id="non_ref_allele_freq-source">
|
475
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
425
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 136</span>
|
476
426
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">non_ref_allele_freq</span>
|
477
427
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">non_ref_allele_count</span> <span class="ruby-operator">/</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">used_depth</span>
|
478
428
|
<span class="ruby-keyword">end</span></pre>
|
@@ -510,15 +460,15 @@ the genotype call,</p>
|
|
510
460
|
|
511
461
|
<p>Example</p>
|
512
462
|
|
513
|
-
<pre class="ruby"><span class="ruby-identifier">vcf</span>.<span class="ruby-identifier">pass_quality?</span>(:<span class="ruby-identifier">min_depth</span> =<span class="ruby-operator">></span> <span class="ruby-value">5</span>, :<span class="ruby-identifier">min_non_ref_count</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">mapping_quality</span> =<span class="ruby-operator">></span> <span class="ruby-value">25</span>)
|
463
|
+
<pre class="ruby"><span class="ruby-identifier">vcf</span>.<span class="ruby-identifier">pass_quality?</span>(:<span class="ruby-identifier">min_depth</span> =<span class="ruby-operator">></span> <span class="ruby-value">5</span>, :<span class="ruby-identifier">min_non_ref_count</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">mapping_quality</span> =<span class="ruby-operator">></span> <span class="ruby-value">25</span>, :<span class="ruby-identifier">min_snp_quality</span> =<span class="ruby-operator">></span> <span class="ruby-value">20</span>)
|
514
464
|
</pre>
|
515
465
|
|
516
466
|
|
517
467
|
|
518
468
|
<div class="method-source-code" id="pass_quality-3F-source">
|
519
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
469
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 169</span>
|
520
470
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">pass_quality?</span>(<span class="ruby-identifier">options</span>)
|
521
|
-
(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">used_depth</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:min_depth</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">mq</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:mapping_quality</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">non_ref_allele_count</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:min_non_ref_count</span>])
|
471
|
+
(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">used_depth</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:min_depth</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">mq</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:mapping_quality</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">non_ref_allele_count</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:min_non_ref_count</span>] <span class="ruby-keyword">and</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">qual</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:min_snp_quality</span>])
|
522
472
|
<span class="ruby-keyword">end</span></pre>
|
523
473
|
</div><!-- pass_quality-3F-source -->
|
524
474
|
|
@@ -548,7 +498,7 @@ sample in the <a href="Vcf.html">Vcf</a> only.</p>
|
|
548
498
|
|
549
499
|
|
550
500
|
<div class="method-source-code" id="pl-source">
|
551
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
501
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 151</span>
|
552
502
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">pl</span>
|
553
503
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">samples</span>[<span class="ruby-string">"1"</span>][<span class="ruby-string">"PL"</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">","</span>)[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_f</span> <span class="ruby-keyword">rescue</span> <span class="ruby-value">0.0</span>
|
554
504
|
<span class="ruby-keyword">end</span></pre>
|
@@ -580,7 +530,7 @@ href="Vcf.html">Vcf</a> object.</p>
|
|
580
530
|
|
581
531
|
|
582
532
|
<div class="method-source-code" id="to_s-source">
|
583
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
533
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 107</span>
|
584
534
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
585
535
|
<span class="ruby-node">"#{self.chrom} #{self.pos} #{self.ref} #{self.alt} #{self.info}"</span>
|
586
536
|
<span class="ruby-keyword">end</span></pre>
|
@@ -611,7 +561,7 @@ of the DP4 attribute. Returns 0.0 if no value is calculated.</p>
|
|
611
561
|
|
612
562
|
|
613
563
|
<div class="method-source-code" id="used_depth-source">
|
614
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
564
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 112</span>
|
615
565
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">used_depth</span>
|
616
566
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">info</span>[<span class="ruby-string">"DP4"</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">","</span>).<span class="ruby-identifier">inject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>,<span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">sum</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">to_f</span>} <span class="ruby-keyword">rescue</span> <span class="ruby-value">0.0</span>
|
617
567
|
<span class="ruby-keyword">end</span></pre>
|
@@ -654,7 +604,7 @@ href="Vcf.html">Vcf</a> is not <strong>.</strong></p>
|
|
654
604
|
|
655
605
|
|
656
606
|
<div class="method-source-code" id="variant-3F-source">
|
657
|
-
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line
|
607
|
+
<pre><span class="ruby-comment"># File lib/bio/util/bio-gngm.rb, line 102</span>
|
658
608
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">variant?</span>
|
659
609
|
<span class="ruby-keyword">not</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">alt</span> <span class="ruby-operator">==</span> <span class="ruby-string">"."</span> <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">false</span>
|
660
610
|
<span class="ruby-keyword">end</span></pre>
|
@@ -677,7 +627,7 @@ href="Vcf.html">Vcf</a> is not <strong>.</strong></p>
|
|
677
627
|
|
678
628
|
<footer id="validator-badges">
|
679
629
|
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
680
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.
|
630
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
681
631
|
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
682
632
|
</footer>
|
683
633
|
|