bio-samtools-wrapper 2.7.0
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.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.travis.yml +27 -0
- data/Gemfile +20 -0
- data/LICENSE.txt +702 -0
- data/README.md +501 -0
- data/Rakefile +73 -0
- data/VERSION +1 -0
- data/bin/bam_consensus.rb +85 -0
- data/bio-samtools-wrapper.gemspec +181 -0
- data/doc/Bio/DB/Alignment.html +552 -0
- data/doc/Bio/DB/Pileup.html +711 -0
- data/doc/Bio/DB/SAM/Library.html +167 -0
- data/doc/Bio/DB/SAM/Tools.html +109 -0
- data/doc/Bio/DB/SAM.html +1853 -0
- data/doc/Bio/DB/Tag.html +208 -0
- data/doc/Bio/DB/Vcf.html +431 -0
- data/doc/Bio/DB.html +105 -0
- data/doc/Bio.html +175 -0
- data/doc/LICENSE_txt.html +846 -0
- data/doc/created.rid +9 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/fonts.css +167 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +106 -0
- data/doc/js/darkfish.js +140 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +580 -0
- data/doc/table_of_contents.html +305 -0
- data/ext/Makefile-bioruby.patch +12 -0
- data/ext/Makefile-suse.patch +11 -0
- data/ext/mkrf_conf.rb +118 -0
- data/lib/bio/BIOExtensions.rb +89 -0
- data/lib/bio/db/alignment.rb +64 -0
- data/lib/bio/db/fastadb.rb +320 -0
- data/lib/bio/db/pileup.rb +273 -0
- data/lib/bio/db/sam/external/COPYING +21 -0
- data/lib/bio/db/sam/external/VERSION +1 -0
- data/lib/bio/db/sam/library.rb +32 -0
- data/lib/bio/db/sam.rb +778 -0
- data/lib/bio/db/vcf.rb +105 -0
- data/lib/bio-samtools-wrapper.rb +9 -0
- data/test/.gitignore +1 -0
- data/test/helper.rb +18 -0
- data/test/sample.vcf +24 -0
- data/test/samples/.gitignore +1 -0
- data/test/samples/LCI/NC_001988.ffn +2 -0
- data/test/samples/LCI/test.bam +0 -0
- data/test/samples/LCI/test.bam.bai +0 -0
- data/test/samples/small/dupes.bam +0 -0
- data/test/samples/small/dupes.sam +274 -0
- data/test/samples/small/ids2.txt +1 -0
- data/test/samples/small/map_for_reheader.sam +8 -0
- data/test/samples/small/map_to_merge1.bam +0 -0
- data/test/samples/small/map_to_merge1.bam.bai +0 -0
- data/test/samples/small/map_to_merge1.sam +8 -0
- data/test/samples/small/map_to_merge2.bam +0 -0
- data/test/samples/small/map_to_merge2.bam.bai +0 -0
- data/test/samples/small/map_to_merge2.sam +8 -0
- data/test/samples/small/no_md.sam +8 -0
- data/test/samples/small/sorted.bam +0 -0
- data/test/samples/small/sorted.bam.bai +0 -0
- data/test/samples/small/test.sai +0 -0
- data/test/samples/small/test.tam +10 -0
- data/test/samples/small/test_chr.fasta +1000 -0
- data/test/samples/small/test_chr.fasta.1.bt2 +0 -0
- data/test/samples/small/test_chr.fasta.2.bt2 +0 -0
- data/test/samples/small/test_chr.fasta.3.bt2 +0 -0
- data/test/samples/small/test_chr.fasta.4.bt2 +0 -0
- data/test/samples/small/test_chr.fasta.amb +2 -0
- data/test/samples/small/test_chr.fasta.ann +3 -0
- data/test/samples/small/test_chr.fasta.bwt +0 -0
- data/test/samples/small/test_chr.fasta.pac +0 -0
- data/test/samples/small/test_chr.fasta.rbwt +0 -0
- data/test/samples/small/test_chr.fasta.rev.1.bt2 +0 -0
- data/test/samples/small/test_chr.fasta.rev.2.bt2 +0 -0
- data/test/samples/small/test_chr.fasta.rpac +0 -0
- data/test/samples/small/test_chr.fasta.rsa +0 -0
- data/test/samples/small/test_chr.fasta.sa +0 -0
- data/test/samples/small/test_cov.svg +273 -0
- data/test/samples/small/test_fastadb.fasta +34 -0
- data/test/samples/small/testu.bam +0 -0
- data/test/samples/small/testu.bed +2 -0
- data/test/test_bio-samtools-wrapper.rb +1 -0
- data/test/test_fastadb.rb +89 -0
- data/test/test_pileup.rb +90 -0
- data/test/test_sam.rb +421 -0
- data/test/test_vcf.rb +79 -0
- data/tutorial/tutorial.html +474 -0
- data/tutorial/tutorial.md +424 -0
- data/tutorial/tutorial.pdf +0 -0
- metadata +254 -0
@@ -0,0 +1,552 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Bio::DB::Alignment - Pileup</title>
|
8
|
+
|
9
|
+
<link href="../../fonts.css" rel="stylesheet">
|
10
|
+
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
var rdoc_rel_prefix = "../../";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script src="../../js/jquery.js"></script>
|
17
|
+
<script src="../../js/navigation.js"></script>
|
18
|
+
<script src="../../js/search_index.js"></script>
|
19
|
+
<script src="../../js/search.js"></script>
|
20
|
+
<script src="../../js/searcher.js"></script>
|
21
|
+
<script src="../../js/darkfish.js"></script>
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
<div id="parent-class-section" class="nav-section">
|
61
|
+
<h3>Parent</h3>
|
62
|
+
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
|
66
|
+
</div>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
|
76
|
+
<li ><a href="#method-c-new">::new</a>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
</nav>
|
83
|
+
|
84
|
+
<main role="main" aria-labelledby="class-Bio::DB::Alignment">
|
85
|
+
<h1 id="class-Bio::DB::Alignment" class="class">
|
86
|
+
class Bio::DB::Alignment
|
87
|
+
</h1>
|
88
|
+
|
89
|
+
<section class="description">
|
90
|
+
|
91
|
+
<p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
|
92
|
+
documentation) <a
|
93
|
+
href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
|
94
|
+
href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
|
95
|
+
they are forward. It is the opposite to the definition in the BAM format
|
96
|
+
for clarity. primary is the negation of is_negative from the BAM format</p>
|
97
|
+
|
98
|
+
</section>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<section class="attribute-method-details" class="method-section">
|
112
|
+
<header>
|
113
|
+
<h3>Attributes</h3>
|
114
|
+
</header>
|
115
|
+
|
116
|
+
|
117
|
+
<div id="attribute-i-al" class="method-detail">
|
118
|
+
<div class="method-heading attribute-method-heading">
|
119
|
+
<span class="method-name">al</span><span
|
120
|
+
class="attribute-access-type">[RW]</span>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div class="method-description">
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div id="attribute-i-calend" class="method-detail">
|
131
|
+
<div class="method-heading attribute-method-heading">
|
132
|
+
<span class="method-name">calend</span><span
|
133
|
+
class="attribute-access-type">[RW]</span>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<div class="method-description">
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div id="attribute-i-cigar" class="method-detail">
|
144
|
+
<div class="method-heading attribute-method-heading">
|
145
|
+
<span class="method-name">cigar</span><span
|
146
|
+
class="attribute-access-type">[RW]</span>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
<div class="method-description">
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div id="attribute-i-failed_quality" class="method-detail">
|
157
|
+
<div class="method-heading attribute-method-heading">
|
158
|
+
<span class="method-name">failed_quality</span><span
|
159
|
+
class="attribute-access-type">[RW]</span>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div class="method-description">
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
<div id="attribute-i-first_in_pair" class="method-detail">
|
170
|
+
<div class="method-heading attribute-method-heading">
|
171
|
+
<span class="method-name">first_in_pair</span><span
|
172
|
+
class="attribute-access-type">[RW]</span>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<div class="method-description">
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div id="attribute-i-flag" class="method-detail">
|
183
|
+
<div class="method-heading attribute-method-heading">
|
184
|
+
<span class="method-name">flag</span><span
|
185
|
+
class="attribute-access-type">[RW]</span>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
<div class="method-description">
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
</div>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
<div id="attribute-i-is_duplicate" class="method-detail">
|
196
|
+
<div class="method-heading attribute-method-heading">
|
197
|
+
<span class="method-name">is_duplicate</span><span
|
198
|
+
class="attribute-access-type">[RW]</span>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div class="method-description">
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
<div id="attribute-i-is_mapped" class="method-detail">
|
209
|
+
<div class="method-heading attribute-method-heading">
|
210
|
+
<span class="method-name">is_mapped</span><span
|
211
|
+
class="attribute-access-type">[RW]</span>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<div class="method-description">
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
</div>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
<div id="attribute-i-is_paired" class="method-detail">
|
222
|
+
<div class="method-heading attribute-method-heading">
|
223
|
+
<span class="method-name">is_paired</span><span
|
224
|
+
class="attribute-access-type">[RW]</span>
|
225
|
+
</div>
|
226
|
+
|
227
|
+
<div class="method-description">
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</div>
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<div id="attribute-i-isize" class="method-detail">
|
235
|
+
<div class="method-heading attribute-method-heading">
|
236
|
+
<span class="method-name">isize</span><span
|
237
|
+
class="attribute-access-type">[RW]</span>
|
238
|
+
</div>
|
239
|
+
|
240
|
+
<div class="method-description">
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div id="attribute-i-mapq" class="method-detail">
|
248
|
+
<div class="method-heading attribute-method-heading">
|
249
|
+
<span class="method-name">mapq</span><span
|
250
|
+
class="attribute-access-type">[RW]</span>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
<div class="method-description">
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</div>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div id="attribute-i-mate_strand" class="method-detail">
|
261
|
+
<div class="method-heading attribute-method-heading">
|
262
|
+
<span class="method-name">mate_strand</span><span
|
263
|
+
class="attribute-access-type">[RW]</span>
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div class="method-description">
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
|
273
|
+
<div id="attribute-i-mate_unmapped" class="method-detail">
|
274
|
+
<div class="method-heading attribute-method-heading">
|
275
|
+
<span class="method-name">mate_unmapped</span><span
|
276
|
+
class="attribute-access-type">[RW]</span>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="method-description">
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
<div id="attribute-i-mpos" class="method-detail">
|
287
|
+
<div class="method-heading attribute-method-heading">
|
288
|
+
<span class="method-name">mpos</span><span
|
289
|
+
class="attribute-access-type">[RW]</span>
|
290
|
+
</div>
|
291
|
+
|
292
|
+
<div class="method-description">
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div id="attribute-i-mrnm" class="method-detail">
|
300
|
+
<div class="method-heading attribute-method-heading">
|
301
|
+
<span class="method-name">mrnm</span><span
|
302
|
+
class="attribute-access-type">[RW]</span>
|
303
|
+
</div>
|
304
|
+
|
305
|
+
<div class="method-description">
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
</div>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
<div id="attribute-i-pos" class="method-detail">
|
313
|
+
<div class="method-heading attribute-method-heading">
|
314
|
+
<span class="method-name">pos</span><span
|
315
|
+
class="attribute-access-type">[RW]</span>
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div class="method-description">
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div id="attribute-i-primary" class="method-detail">
|
326
|
+
<div class="method-heading attribute-method-heading">
|
327
|
+
<span class="method-name">primary</span><span
|
328
|
+
class="attribute-access-type">[RW]</span>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
<div class="method-description">
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
</div>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
<div id="attribute-i-qlen" class="method-detail">
|
339
|
+
<div class="method-heading attribute-method-heading">
|
340
|
+
<span class="method-name">qlen</span><span
|
341
|
+
class="attribute-access-type">[RW]</span>
|
342
|
+
</div>
|
343
|
+
|
344
|
+
<div class="method-description">
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
</div>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
<div id="attribute-i-qname" class="method-detail">
|
352
|
+
<div class="method-heading attribute-method-heading">
|
353
|
+
<span class="method-name">qname</span><span
|
354
|
+
class="attribute-access-type">[RW]</span>
|
355
|
+
</div>
|
356
|
+
|
357
|
+
<div class="method-description">
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</div>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
<div id="attribute-i-qual" class="method-detail">
|
365
|
+
<div class="method-heading attribute-method-heading">
|
366
|
+
<span class="method-name">qual</span><span
|
367
|
+
class="attribute-access-type">[RW]</span>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
<div class="method-description">
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
</div>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<div id="attribute-i-query_strand" class="method-detail">
|
378
|
+
<div class="method-heading attribute-method-heading">
|
379
|
+
<span class="method-name">query_strand</span><span
|
380
|
+
class="attribute-access-type">[RW]</span>
|
381
|
+
</div>
|
382
|
+
|
383
|
+
<div class="method-description">
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
</div>
|
388
|
+
</div>
|
389
|
+
|
390
|
+
<div id="attribute-i-query_unmapped" class="method-detail">
|
391
|
+
<div class="method-heading attribute-method-heading">
|
392
|
+
<span class="method-name">query_unmapped</span><span
|
393
|
+
class="attribute-access-type">[RW]</span>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
<div class="method-description">
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
</div>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
<div id="attribute-i-rname" class="method-detail">
|
404
|
+
<div class="method-heading attribute-method-heading">
|
405
|
+
<span class="method-name">rname</span><span
|
406
|
+
class="attribute-access-type">[RW]</span>
|
407
|
+
</div>
|
408
|
+
|
409
|
+
<div class="method-description">
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
</div>
|
414
|
+
</div>
|
415
|
+
|
416
|
+
<div id="attribute-i-samstr" class="method-detail">
|
417
|
+
<div class="method-heading attribute-method-heading">
|
418
|
+
<span class="method-name">samstr</span><span
|
419
|
+
class="attribute-access-type">[RW]</span>
|
420
|
+
</div>
|
421
|
+
|
422
|
+
<div class="method-description">
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
|
429
|
+
<div id="attribute-i-second_in_pair" class="method-detail">
|
430
|
+
<div class="method-heading attribute-method-heading">
|
431
|
+
<span class="method-name">second_in_pair</span><span
|
432
|
+
class="attribute-access-type">[RW]</span>
|
433
|
+
</div>
|
434
|
+
|
435
|
+
<div class="method-description">
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
</div>
|
440
|
+
</div>
|
441
|
+
|
442
|
+
<div id="attribute-i-seq" class="method-detail">
|
443
|
+
<div class="method-heading attribute-method-heading">
|
444
|
+
<span class="method-name">seq</span><span
|
445
|
+
class="attribute-access-type">[RW]</span>
|
446
|
+
</div>
|
447
|
+
|
448
|
+
<div class="method-description">
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
</div>
|
453
|
+
</div>
|
454
|
+
|
455
|
+
<div id="attribute-i-tags" class="method-detail">
|
456
|
+
<div class="method-heading attribute-method-heading">
|
457
|
+
<span class="method-name">tags</span><span
|
458
|
+
class="attribute-access-type">[RW]</span>
|
459
|
+
</div>
|
460
|
+
|
461
|
+
<div class="method-description">
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
</div>
|
466
|
+
</div>
|
467
|
+
|
468
|
+
</section>
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
473
|
+
<header>
|
474
|
+
<h3>Public Class Methods</h3>
|
475
|
+
</header>
|
476
|
+
|
477
|
+
|
478
|
+
<div id="method-c-new" class="method-detail ">
|
479
|
+
|
480
|
+
<div class="method-heading">
|
481
|
+
<span class="method-name">new</span><span
|
482
|
+
class="method-args">(sam_string)</span>
|
483
|
+
|
484
|
+
<span class="method-click-advice">click to toggle source</span>
|
485
|
+
|
486
|
+
</div>
|
487
|
+
|
488
|
+
|
489
|
+
<div class="method-description">
|
490
|
+
|
491
|
+
<p>parses the SAM string into its constituents and set its attributes</p>
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
<div class="method-source-code" id="new-source">
|
497
|
+
<pre><span class="ruby-comment"># File lib/bio/db/alignment.rb, line 24</span>
|
498
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">sam_string</span>)
|
499
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">sam_string</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\t"</span>)
|
500
|
+
<span class="ruby-ivar">@qname</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">0</span>]
|
501
|
+
<span class="ruby-ivar">@flag</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_i</span>
|
502
|
+
<span class="ruby-ivar">@rname</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">2</span>]
|
503
|
+
<span class="ruby-ivar">@pos</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">3</span>].<span class="ruby-identifier">to_i</span>
|
504
|
+
<span class="ruby-ivar">@mapq</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">4</span>].<span class="ruby-identifier">to_i</span>
|
505
|
+
<span class="ruby-ivar">@cigar</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">5</span>]
|
506
|
+
<span class="ruby-ivar">@mrnm</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">6</span>]
|
507
|
+
<span class="ruby-ivar">@mpos</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">7</span>].<span class="ruby-identifier">to_i</span>
|
508
|
+
<span class="ruby-ivar">@isize</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">8</span>].<span class="ruby-identifier">to_i</span>
|
509
|
+
<span class="ruby-ivar">@seq</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">9</span>]
|
510
|
+
<span class="ruby-ivar">@qual</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">10</span>]
|
511
|
+
<span class="ruby-ivar">@tags</span> = {}
|
512
|
+
<span class="ruby-value">11</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
|
513
|
+
<span class="ruby-identifier">t</span> = <span class="ruby-constant">Bio</span><span class="ruby-operator">::</span><span class="ruby-constant">DB</span><span class="ruby-operator">::</span><span class="ruby-constant">Tag</span>.<span class="ruby-identifier">new</span>
|
514
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">s</span>[<span class="ruby-identifier">n</span>])
|
515
|
+
<span class="ruby-identifier">tags</span>[<span class="ruby-identifier">t</span>.<span class="ruby-identifier">tag</span>] = <span class="ruby-identifier">t</span>
|
516
|
+
}
|
517
|
+
|
518
|
+
<span class="ruby-ivar">@is_paired</span> = (<span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0001</span>) <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
519
|
+
<span class="ruby-ivar">@is_mapped</span> = <span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0002</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
520
|
+
<span class="ruby-ivar">@query_unmapped</span> = <span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0004</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
521
|
+
<span class="ruby-ivar">@mate_unmapped</span> = <span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0008</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
522
|
+
<span class="ruby-ivar">@query_strand</span> = <span class="ruby-operator">!</span>(<span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0010</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>)
|
523
|
+
<span class="ruby-ivar">@mate_strand</span> = <span class="ruby-operator">!</span>(<span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0020</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>)
|
524
|
+
<span class="ruby-ivar">@first_in_pair</span> = <span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0040</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
525
|
+
<span class="ruby-ivar">@second_in_pair</span> = <span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0080</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
526
|
+
<span class="ruby-ivar">@primary</span> = <span class="ruby-operator">!</span>(<span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0100</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>)
|
527
|
+
<span class="ruby-ivar">@failed_quality</span> = <span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0200</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
528
|
+
<span class="ruby-ivar">@is_duplicate</span> = <span class="ruby-ivar">@flag</span> <span class="ruby-operator">&</span> <span class="ruby-value">0x0400</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
529
|
+
|
530
|
+
<span class="ruby-keyword">end</span></pre>
|
531
|
+
</div>
|
532
|
+
|
533
|
+
</div>
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
</div>
|
539
|
+
|
540
|
+
|
541
|
+
</section>
|
542
|
+
|
543
|
+
</section>
|
544
|
+
</main>
|
545
|
+
|
546
|
+
|
547
|
+
<footer id="validator-badges" role="contentinfo">
|
548
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
549
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
550
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
551
|
+
</footer>
|
552
|
+
|