bio-samtools 0.4.1 → 0.4.2

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.
Files changed (74) hide show
  1. data/VERSION +1 -1
  2. data/bio-samtools.gemspec +60 -6
  3. data/doc/Bio.html +171 -0
  4. data/doc/Bio/DB.html +163 -0
  5. data/doc/Bio/DB/Alignment.html +780 -0
  6. data/doc/Bio/DB/SAM.html +1241 -0
  7. data/doc/Bio/DB/SAM/Library.html +217 -0
  8. data/doc/Bio/DB/SAM/Tools.html +331 -0
  9. data/doc/Bio/DB/SAM/Tools/Bam1CoreT.html +159 -0
  10. data/doc/Bio/DB/SAM/Tools/Bam1T.html +220 -0
  11. data/doc/Bio/DB/SAM/Tools/BamHeaderT.html +249 -0
  12. data/doc/Bio/DB/SAM/Tools/BamPileup1T.html +159 -0
  13. data/doc/Bio/DB/SAM/Tools/SamfileT.html +171 -0
  14. data/doc/Bio/DB/SAM/Tools/SamfileTX.html +159 -0
  15. data/doc/Bio/DB/SAMException.html +205 -0
  16. data/doc/Bio/DB/Tag.html +254 -0
  17. data/doc/LICENSE_txt.html +881 -0
  18. data/doc/LibC.html +153 -0
  19. data/doc/Pileup.html +571 -0
  20. data/doc/Vcf.html +473 -0
  21. data/doc/created.rid +10 -1
  22. data/doc/images/add.png +0 -0
  23. data/doc/images/brick.png +0 -0
  24. data/doc/images/brick_link.png +0 -0
  25. data/doc/images/bug.png +0 -0
  26. data/doc/images/bullet_black.png +0 -0
  27. data/doc/images/bullet_toggle_minus.png +0 -0
  28. data/doc/images/bullet_toggle_plus.png +0 -0
  29. data/doc/images/date.png +0 -0
  30. data/doc/images/delete.png +0 -0
  31. data/doc/images/find.png +0 -0
  32. data/doc/images/loadingAnimation.gif +0 -0
  33. data/doc/images/macFFBgHack.png +0 -0
  34. data/doc/images/package.png +0 -0
  35. data/doc/images/page_green.png +0 -0
  36. data/doc/images/page_white_text.png +0 -0
  37. data/doc/images/page_white_width.png +0 -0
  38. data/doc/images/plugin.png +0 -0
  39. data/doc/images/ruby.png +0 -0
  40. data/doc/images/tag_blue.png +0 -0
  41. data/doc/images/tag_green.png +0 -0
  42. data/doc/images/transparent.png +0 -0
  43. data/doc/images/wrench.png +0 -0
  44. data/doc/images/wrench_orange.png +0 -0
  45. data/doc/images/zoom.png +0 -0
  46. data/doc/index.html +109 -21
  47. data/doc/js/darkfish.js +153 -0
  48. data/doc/js/jquery.js +18 -0
  49. data/doc/js/navigation.js +142 -0
  50. data/doc/js/search.js +94 -0
  51. data/doc/js/search_index.js +1 -0
  52. data/doc/js/searcher.js +228 -0
  53. data/doc/lib/bio-samtools_rb.html +115 -0
  54. data/doc/lib/bio/db/sam/bam_rb.html +121 -0
  55. data/doc/lib/bio/db/sam/faidx_rb.html +117 -0
  56. data/doc/lib/bio/db/sam/library_rb.html +115 -0
  57. data/doc/lib/bio/db/sam/pileup_rb.html +171 -0
  58. data/doc/lib/bio/db/sam/sam_rb.html +121 -0
  59. data/doc/lib/bio/db/sam/vcf_rb.html +124 -0
  60. data/doc/lib/bio/db/sam_rb.html +115 -0
  61. data/doc/rdoc.css +543 -0
  62. data/doc/table_of_contents.html +186 -0
  63. data/ext/Makefile-bioruby.patch +1 -1
  64. data/ext/Rakefile +8 -1
  65. data/ext/mkrf_conf.rb +8 -1
  66. data/lib/bio/db/sam.rb +140 -27
  67. data/lib/bio/db/sam/vcf.rb +0 -1
  68. data/test/basictest.rb +4 -4
  69. data/test/test_basic.rb +50 -34
  70. metadata +79 -25
  71. data/test/coverage.rb +0 -26
  72. data/test/coverage_plot.rb +0 -28
  73. data/test/feature.rb +0 -0
  74. data/test/test_pileup.rb +0 -68
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/bio-samtools.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bio-samtools}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Ricardo Ramirez-Gonzalez}, %q{Dan MacLean}, %q{Raoul J.P. Bonnal}]
12
- s.date = %q{2011-11-09}
12
+ s.date = %q{2011-11-10}
13
13
  s.description = %q{Binder of samtools for ruby, on the top of FFI.
14
14
 
15
15
  This project was born from the need to add support of BAM files to
@@ -29,6 +29,24 @@ Gem::Specification.new do |s|
29
29
  "Rakefile",
30
30
  "VERSION",
31
31
  "bio-samtools.gemspec",
32
+ "doc/Bio.html",
33
+ "doc/Bio/DB.html",
34
+ "doc/Bio/DB/Alignment.html",
35
+ "doc/Bio/DB/SAM.html",
36
+ "doc/Bio/DB/SAM/Library.html",
37
+ "doc/Bio/DB/SAM/Tools.html",
38
+ "doc/Bio/DB/SAM/Tools/Bam1CoreT.html",
39
+ "doc/Bio/DB/SAM/Tools/Bam1T.html",
40
+ "doc/Bio/DB/SAM/Tools/BamHeaderT.html",
41
+ "doc/Bio/DB/SAM/Tools/BamPileup1T.html",
42
+ "doc/Bio/DB/SAM/Tools/SamfileT.html",
43
+ "doc/Bio/DB/SAM/Tools/SamfileTX.html",
44
+ "doc/Bio/DB/SAMException.html",
45
+ "doc/Bio/DB/Tag.html",
46
+ "doc/LICENSE_txt.html",
47
+ "doc/LibC.html",
48
+ "doc/Pileup.html",
49
+ "doc/Vcf.html",
32
50
  "doc/basic_styles.css",
33
51
  "doc/classes/Bio.html",
34
52
  "doc/classes/Bio/DB.html",
@@ -89,8 +107,48 @@ Gem::Specification.new do |s|
89
107
  "doc/fr_class_index.html",
90
108
  "doc/fr_file_index.html",
91
109
  "doc/fr_method_index.html",
110
+ "doc/images/add.png",
111
+ "doc/images/brick.png",
112
+ "doc/images/brick_link.png",
113
+ "doc/images/bug.png",
114
+ "doc/images/bullet_black.png",
115
+ "doc/images/bullet_toggle_minus.png",
116
+ "doc/images/bullet_toggle_plus.png",
117
+ "doc/images/date.png",
118
+ "doc/images/delete.png",
119
+ "doc/images/find.png",
120
+ "doc/images/loadingAnimation.gif",
121
+ "doc/images/macFFBgHack.png",
122
+ "doc/images/package.png",
123
+ "doc/images/page_green.png",
124
+ "doc/images/page_white_text.png",
125
+ "doc/images/page_white_width.png",
126
+ "doc/images/plugin.png",
127
+ "doc/images/ruby.png",
128
+ "doc/images/tag_blue.png",
129
+ "doc/images/tag_green.png",
130
+ "doc/images/transparent.png",
131
+ "doc/images/wrench.png",
132
+ "doc/images/wrench_orange.png",
133
+ "doc/images/zoom.png",
92
134
  "doc/index.html",
135
+ "doc/js/darkfish.js",
136
+ "doc/js/jquery.js",
137
+ "doc/js/navigation.js",
138
+ "doc/js/search.js",
139
+ "doc/js/search_index.js",
140
+ "doc/js/searcher.js",
141
+ "doc/lib/bio-samtools_rb.html",
142
+ "doc/lib/bio/db/sam/bam_rb.html",
143
+ "doc/lib/bio/db/sam/faidx_rb.html",
144
+ "doc/lib/bio/db/sam/library_rb.html",
145
+ "doc/lib/bio/db/sam/pileup_rb.html",
146
+ "doc/lib/bio/db/sam/sam_rb.html",
147
+ "doc/lib/bio/db/sam/vcf_rb.html",
148
+ "doc/lib/bio/db/sam_rb.html",
93
149
  "doc/rdoc-style.css",
150
+ "doc/rdoc.css",
151
+ "doc/table_of_contents.html",
94
152
  "doc/tutorial.html",
95
153
  "doc/tutorial.pdf",
96
154
  "ext/Makefile-bioruby.patch",
@@ -108,9 +166,6 @@ Gem::Specification.new do |s|
108
166
  "lib/bio/db/sam/sam.rb",
109
167
  "lib/bio/db/sam/vcf.rb",
110
168
  "test/basictest.rb",
111
- "test/coverage.rb",
112
- "test/coverage_plot.rb",
113
- "test/feature.rb",
114
169
  "test/helper.rb",
115
170
  "test/pileup.rb",
116
171
  "test/samples/small/ids2.txt",
@@ -134,7 +189,6 @@ Gem::Specification.new do |s|
134
189
  "test/samples/small/testu.bam.bai",
135
190
  "test/test_basic.rb",
136
191
  "test/test_bio-samtools.rb",
137
- "test/test_pileup.rb",
138
192
  "test/test_vcf.rb"
139
193
  ]
140
194
  s.homepage = %q{http://github.com/helios/bioruby-samtools}
data/doc/Bio.html ADDED
@@ -0,0 +1,171 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Module: Bio</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/bam.rb
51
+ <li>lib/bio/db/sam/faidx.rb
52
+ <li>lib/bio/db/sam/library.rb
53
+ <li>lib/bio/db/sam/sam.rb
54
+ <li>lib/bio/db/sam.rb
55
+ </ul>
56
+ </nav>
57
+
58
+
59
+ </div>
60
+
61
+ <div id="class-metadata">
62
+
63
+
64
+
65
+
66
+ </div>
67
+
68
+ <div id="project-metadata">
69
+ <nav id="fileindex-section" class="section project-section">
70
+ <h3 class="section-header">Pages</h3>
71
+
72
+ <ul>
73
+
74
+ <li class="file"><a href="./LICENSE_txt.html">LICENSE</a>
75
+
76
+ </ul>
77
+ </nav>
78
+
79
+ <nav id="classindex-section" class="section project-section">
80
+ <h3 class="section-header">Class and Module Index</h3>
81
+
82
+ <ul class="link-list">
83
+
84
+ <li><a href="./Bio.html">Bio</a>
85
+
86
+ <li><a href="./Bio/DB.html">Bio::DB</a>
87
+
88
+ <li><a href="./Bio/DB/Alignment.html">Bio::DB::Alignment</a>
89
+
90
+ <li><a href="./Bio/DB/SAM.html">Bio::DB::SAM</a>
91
+
92
+ <li><a href="./Bio/DB/SAM/Library.html">Bio::DB::SAM::Library</a>
93
+
94
+ <li><a href="./Bio/DB/SAM/Tools.html">Bio::DB::SAM::Tools</a>
95
+
96
+ <li><a href="./Bio/DB/SAM/Tools/Bam1CoreT.html">Bio::DB::SAM::Tools::Bam1CoreT</a>
97
+
98
+ <li><a href="./Bio/DB/SAM/Tools/Bam1T.html">Bio::DB::SAM::Tools::Bam1T</a>
99
+
100
+ <li><a href="./Bio/DB/SAM/Tools/BamHeaderT.html">Bio::DB::SAM::Tools::BamHeaderT</a>
101
+
102
+ <li><a href="./Bio/DB/SAM/Tools/BamPileup1T.html">Bio::DB::SAM::Tools::BamPileup1T</a>
103
+
104
+ <li><a href="./Bio/DB/SAM/Tools/SamfileT.html">Bio::DB::SAM::Tools::SamfileT</a>
105
+
106
+ <li><a href="./Bio/DB/SAM/Tools/SamfileTX.html">Bio::DB::SAM::Tools::SamfileTX</a>
107
+
108
+ <li><a href="./Bio/DB/SAMException.html">Bio::DB::SAMException</a>
109
+
110
+ <li><a href="./Bio/DB/Sam.html">Bio::DB::Sam</a>
111
+
112
+ <li><a href="./Bio/DB/Tag.html">Bio::DB::Tag</a>
113
+
114
+ <li><a href="./LibC.html">LibC</a>
115
+
116
+ <li><a href="./Pileup.html">Pileup</a>
117
+
118
+ <li><a href="./Vcf.html">Vcf</a>
119
+
120
+ </ul>
121
+ </nav>
122
+
123
+ </div>
124
+ </nav>
125
+
126
+ <div id="documentation">
127
+ <h1 class="module">module Bio</h1>
128
+
129
+ <div id="description" class="description">
130
+
131
+ <p>require ‘rubygems’ require ‘ffi’</p>
132
+
133
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'bio/db/sam/faidx'</span>
134
+ <span class="ruby-identifier">require</span> <span class="ruby-string">'bio/db/sam/sam'</span>
135
+ </pre>
136
+
137
+ <p>require ‘rubygems’ require’ffi’ require ‘bio/db/sam/bam’</p>
138
+
139
+ <pre>sam.rb
140
+
141
+ Created by Ricardo Ramirez on 3/25/10.</pre>
142
+
143
+ <p>require ‘rubygems’ require’ffi’ require ‘bio/db/sam/bam’</p>
144
+
145
+ </div><!-- description -->
146
+
147
+
148
+
149
+
150
+ <section id="5Buntitled-5D" class="documentation-section">
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <!-- Methods -->
160
+
161
+ </section><!-- 5Buntitled-5D -->
162
+
163
+ </div><!-- documentation -->
164
+
165
+
166
+ <footer id="validator-badges">
167
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
168
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
169
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
170
+ </footer>
171
+
data/doc/Bio/DB.html ADDED
@@ -0,0 +1,163 @@
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</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/bam.rb
51
+ <li>lib/bio/db/sam/faidx.rb
52
+ <li>lib/bio/db/sam/library.rb
53
+ <li>lib/bio/db/sam/sam.rb
54
+ <li>lib/bio/db/sam.rb
55
+ </ul>
56
+ </nav>
57
+
58
+
59
+ </div>
60
+
61
+ <div id="class-metadata">
62
+
63
+ <nav id="parent-class-section" class="section">
64
+ <h3 class="section-header">Parent</h3>
65
+
66
+ <p class="link">Object
67
+
68
+ </nav>
69
+
70
+
71
+
72
+ </div>
73
+
74
+ <div id="project-metadata">
75
+ <nav id="fileindex-section" class="section project-section">
76
+ <h3 class="section-header">Pages</h3>
77
+
78
+ <ul>
79
+
80
+ <li class="file"><a href="../LICENSE_txt.html">LICENSE</a>
81
+
82
+ </ul>
83
+ </nav>
84
+
85
+ <nav id="classindex-section" class="section project-section">
86
+ <h3 class="section-header">Class and Module Index</h3>
87
+
88
+ <ul class="link-list">
89
+
90
+ <li><a href="../Bio.html">Bio</a>
91
+
92
+ <li><a href="../Bio/DB.html">Bio::DB</a>
93
+
94
+ <li><a href="../Bio/DB/Alignment.html">Bio::DB::Alignment</a>
95
+
96
+ <li><a href="../Bio/DB/SAM.html">Bio::DB::SAM</a>
97
+
98
+ <li><a href="../Bio/DB/SAM/Library.html">Bio::DB::SAM::Library</a>
99
+
100
+ <li><a href="../Bio/DB/SAM/Tools.html">Bio::DB::SAM::Tools</a>
101
+
102
+ <li><a href="../Bio/DB/SAM/Tools/Bam1CoreT.html">Bio::DB::SAM::Tools::Bam1CoreT</a>
103
+
104
+ <li><a href="../Bio/DB/SAM/Tools/Bam1T.html">Bio::DB::SAM::Tools::Bam1T</a>
105
+
106
+ <li><a href="../Bio/DB/SAM/Tools/BamHeaderT.html">Bio::DB::SAM::Tools::BamHeaderT</a>
107
+
108
+ <li><a href="../Bio/DB/SAM/Tools/BamPileup1T.html">Bio::DB::SAM::Tools::BamPileup1T</a>
109
+
110
+ <li><a href="../Bio/DB/SAM/Tools/SamfileT.html">Bio::DB::SAM::Tools::SamfileT</a>
111
+
112
+ <li><a href="../Bio/DB/SAM/Tools/SamfileTX.html">Bio::DB::SAM::Tools::SamfileTX</a>
113
+
114
+ <li><a href="../Bio/DB/SAMException.html">Bio::DB::SAMException</a>
115
+
116
+ <li><a href="../Bio/DB/Sam.html">Bio::DB::Sam</a>
117
+
118
+ <li><a href="../Bio/DB/Tag.html">Bio::DB::Tag</a>
119
+
120
+ <li><a href="../LibC.html">LibC</a>
121
+
122
+ <li><a href="../Pileup.html">Pileup</a>
123
+
124
+ <li><a href="../Vcf.html">Vcf</a>
125
+
126
+ </ul>
127
+ </nav>
128
+
129
+ </div>
130
+ </nav>
131
+
132
+ <div id="documentation">
133
+ <h1 class="class">class Bio::DB</h1>
134
+
135
+ <div id="description" class="description">
136
+
137
+ </div><!-- description -->
138
+
139
+
140
+
141
+
142
+ <section id="5Buntitled-5D" class="documentation-section">
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+ <!-- Methods -->
152
+
153
+ </section><!-- 5Buntitled-5D -->
154
+
155
+ </div><!-- documentation -->
156
+
157
+
158
+ <footer id="validator-badges">
159
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
160
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
161
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
162
+ </footer>
163
+
@@ -0,0 +1,780 @@
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::Alignment</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">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-finalize">::finalize</a>
74
+
75
+ <li><a href="#method-c-new">::new</a>
76
+
77
+ <li><a href="#method-i-sam-3D">#sam=</a>
78
+
79
+ <li><a href="#method-i-set">#set</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 Bio::DB::Alignment</h1>
146
+
147
+ <div id="description" class="description">
148
+
149
+ </div><!-- description -->
150
+
151
+
152
+
153
+
154
+ <section id="5Buntitled-5D" class="documentation-section">
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ <!-- Attributes -->
163
+ <section id="attribute-method-details" class="method-section section">
164
+ <h3 class="section-header">Attributes</h3>
165
+
166
+
167
+ <div id="attribute-i-al" class="method-detail">
168
+ <div class="method-heading attribute-method-heading">
169
+ <span class="method-name">al</span><span
170
+ class="attribute-access-type">[RW]</span>
171
+ </div>
172
+
173
+ <div class="method-description">
174
+
175
+ <p>Attributes from the format</p>
176
+
177
+ </div>
178
+ </div>
179
+
180
+ <div id="attribute-i-calend" class="method-detail">
181
+ <div class="method-heading attribute-method-heading">
182
+ <span class="method-name">calend</span><span
183
+ class="attribute-access-type">[RW]</span>
184
+ </div>
185
+
186
+ <div class="method-description">
187
+
188
+ <p>Attributes pulled with the C library</p>
189
+
190
+ </div>
191
+ </div>
192
+
193
+ <div id="attribute-i-cigar" class="method-detail">
194
+ <div class="method-heading attribute-method-heading">
195
+ <span class="method-name">cigar</span><span
196
+ class="attribute-access-type">[RW]</span>
197
+ </div>
198
+
199
+ <div class="method-description">
200
+
201
+ <p>Attributes from the format</p>
202
+
203
+ </div>
204
+ </div>
205
+
206
+ <div id="attribute-i-failed_quality" class="method-detail">
207
+ <div class="method-heading attribute-method-heading">
208
+ <span class="method-name">failed_quality</span><span
209
+ class="attribute-access-type">[RW]</span>
210
+ </div>
211
+
212
+ <div class="method-description">
213
+
214
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
215
+ documentation) <a
216
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
217
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
218
+ they are forward. It is the opposite to the definition in the BAM format
219
+ for clarity. primary is the negation of is_negative from the BAM format</p>
220
+
221
+ </div>
222
+ </div>
223
+
224
+ <div id="attribute-i-first_in_pair" class="method-detail">
225
+ <div class="method-heading attribute-method-heading">
226
+ <span class="method-name">first_in_pair</span><span
227
+ class="attribute-access-type">[RW]</span>
228
+ </div>
229
+
230
+ <div class="method-description">
231
+
232
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
233
+ documentation) <a
234
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
235
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
236
+ they are forward. It is the opposite to the definition in the BAM format
237
+ for clarity. primary is the negation of is_negative from the BAM format</p>
238
+
239
+ </div>
240
+ </div>
241
+
242
+ <div id="attribute-i-flag" class="method-detail">
243
+ <div class="method-heading attribute-method-heading">
244
+ <span class="method-name">flag</span><span
245
+ class="attribute-access-type">[RW]</span>
246
+ </div>
247
+
248
+ <div class="method-description">
249
+
250
+ <p>Attributes from the format</p>
251
+
252
+ </div>
253
+ </div>
254
+
255
+ <div id="attribute-i-is_duplicate" class="method-detail">
256
+ <div class="method-heading attribute-method-heading">
257
+ <span class="method-name">is_duplicate</span><span
258
+ class="attribute-access-type">[RW]</span>
259
+ </div>
260
+
261
+ <div class="method-description">
262
+
263
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
264
+ documentation) <a
265
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
266
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
267
+ they are forward. It is the opposite to the definition in the BAM format
268
+ for clarity. primary is the negation of is_negative from the BAM format</p>
269
+
270
+ </div>
271
+ </div>
272
+
273
+ <div id="attribute-i-is_mapped" class="method-detail">
274
+ <div class="method-heading attribute-method-heading">
275
+ <span class="method-name">is_mapped</span><span
276
+ class="attribute-access-type">[RW]</span>
277
+ </div>
278
+
279
+ <div class="method-description">
280
+
281
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
282
+ documentation) <a
283
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
284
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
285
+ they are forward. It is the opposite to the definition in the BAM format
286
+ for clarity. primary is the negation of is_negative from the BAM format</p>
287
+
288
+ </div>
289
+ </div>
290
+
291
+ <div id="attribute-i-is_paired" class="method-detail">
292
+ <div class="method-heading attribute-method-heading">
293
+ <span class="method-name">is_paired</span><span
294
+ class="attribute-access-type">[RW]</span>
295
+ </div>
296
+
297
+ <div class="method-description">
298
+
299
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
300
+ documentation) <a
301
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
302
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
303
+ they are forward. It is the opposite to the definition in the BAM format
304
+ for clarity. primary is the negation of is_negative from the BAM format</p>
305
+
306
+ </div>
307
+ </div>
308
+
309
+ <div id="attribute-i-isize" class="method-detail">
310
+ <div class="method-heading attribute-method-heading">
311
+ <span class="method-name">isize</span><span
312
+ class="attribute-access-type">[RW]</span>
313
+ </div>
314
+
315
+ <div class="method-description">
316
+
317
+ <p>Attributes from the format</p>
318
+
319
+ </div>
320
+ </div>
321
+
322
+ <div id="attribute-i-mapq" class="method-detail">
323
+ <div class="method-heading attribute-method-heading">
324
+ <span class="method-name">mapq</span><span
325
+ class="attribute-access-type">[RW]</span>
326
+ </div>
327
+
328
+ <div class="method-description">
329
+
330
+ <p>Attributes from the format</p>
331
+
332
+ </div>
333
+ </div>
334
+
335
+ <div id="attribute-i-mate_strand" class="method-detail">
336
+ <div class="method-heading attribute-method-heading">
337
+ <span class="method-name">mate_strand</span><span
338
+ class="attribute-access-type">[RW]</span>
339
+ </div>
340
+
341
+ <div class="method-description">
342
+
343
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
344
+ documentation) <a
345
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
346
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
347
+ they are forward. It is the opposite to the definition in the BAM format
348
+ for clarity. primary is the negation of is_negative from the BAM format</p>
349
+
350
+ </div>
351
+ </div>
352
+
353
+ <div id="attribute-i-mate_unmapped" class="method-detail">
354
+ <div class="method-heading attribute-method-heading">
355
+ <span class="method-name">mate_unmapped</span><span
356
+ class="attribute-access-type">[RW]</span>
357
+ </div>
358
+
359
+ <div class="method-description">
360
+
361
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
362
+ documentation) <a
363
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
364
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
365
+ they are forward. It is the opposite to the definition in the BAM format
366
+ for clarity. primary is the negation of is_negative from the BAM format</p>
367
+
368
+ </div>
369
+ </div>
370
+
371
+ <div id="attribute-i-mpos" class="method-detail">
372
+ <div class="method-heading attribute-method-heading">
373
+ <span class="method-name">mpos</span><span
374
+ class="attribute-access-type">[RW]</span>
375
+ </div>
376
+
377
+ <div class="method-description">
378
+
379
+ <p>Attributes from the format</p>
380
+
381
+ </div>
382
+ </div>
383
+
384
+ <div id="attribute-i-mrnm" class="method-detail">
385
+ <div class="method-heading attribute-method-heading">
386
+ <span class="method-name">mrnm</span><span
387
+ class="attribute-access-type">[RW]</span>
388
+ </div>
389
+
390
+ <div class="method-description">
391
+
392
+ <p>Attributes from the format</p>
393
+
394
+ </div>
395
+ </div>
396
+
397
+ <div id="attribute-i-pos" class="method-detail">
398
+ <div class="method-heading attribute-method-heading">
399
+ <span class="method-name">pos</span><span
400
+ class="attribute-access-type">[RW]</span>
401
+ </div>
402
+
403
+ <div class="method-description">
404
+
405
+ <p>Attributes from the format</p>
406
+
407
+ </div>
408
+ </div>
409
+
410
+ <div id="attribute-i-primary" class="method-detail">
411
+ <div class="method-heading attribute-method-heading">
412
+ <span class="method-name">primary</span><span
413
+ class="attribute-access-type">[RW]</span>
414
+ </div>
415
+
416
+ <div class="method-description">
417
+
418
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
419
+ documentation) <a
420
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
421
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
422
+ they are forward. It is the opposite to the definition in the BAM format
423
+ for clarity. primary is the negation of is_negative from the BAM format</p>
424
+
425
+ </div>
426
+ </div>
427
+
428
+ <div id="attribute-i-qlen" class="method-detail">
429
+ <div class="method-heading attribute-method-heading">
430
+ <span class="method-name">qlen</span><span
431
+ class="attribute-access-type">[RW]</span>
432
+ </div>
433
+
434
+ <div class="method-description">
435
+
436
+ <p>Attributes pulled with the C library</p>
437
+
438
+ </div>
439
+ </div>
440
+
441
+ <div id="attribute-i-qname" class="method-detail">
442
+ <div class="method-heading attribute-method-heading">
443
+ <span class="method-name">qname</span><span
444
+ class="attribute-access-type">[RW]</span>
445
+ </div>
446
+
447
+ <div class="method-description">
448
+
449
+ <p>Attributes from the format</p>
450
+
451
+ </div>
452
+ </div>
453
+
454
+ <div id="attribute-i-qual" class="method-detail">
455
+ <div class="method-heading attribute-method-heading">
456
+ <span class="method-name">qual</span><span
457
+ class="attribute-access-type">[RW]</span>
458
+ </div>
459
+
460
+ <div class="method-description">
461
+
462
+ <p>Attributes from the format</p>
463
+
464
+ </div>
465
+ </div>
466
+
467
+ <div id="attribute-i-query_strand" class="method-detail">
468
+ <div class="method-heading attribute-method-heading">
469
+ <span class="method-name">query_strand</span><span
470
+ class="attribute-access-type">[RW]</span>
471
+ </div>
472
+
473
+ <div class="method-description">
474
+
475
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
476
+ documentation) <a
477
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
478
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
479
+ they are forward. It is the opposite to the definition in the BAM format
480
+ for clarity. primary is the negation of is_negative from the BAM format</p>
481
+
482
+ </div>
483
+ </div>
484
+
485
+ <div id="attribute-i-query_unmapped" class="method-detail">
486
+ <div class="method-heading attribute-method-heading">
487
+ <span class="method-name">query_unmapped</span><span
488
+ class="attribute-access-type">[RW]</span>
489
+ </div>
490
+
491
+ <div class="method-description">
492
+
493
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
494
+ documentation) <a
495
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
496
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
497
+ they are forward. It is the opposite to the definition in the BAM format
498
+ for clarity. primary is the negation of is_negative from the BAM format</p>
499
+
500
+ </div>
501
+ </div>
502
+
503
+ <div id="attribute-i-rname" class="method-detail">
504
+ <div class="method-heading attribute-method-heading">
505
+ <span class="method-name">rname</span><span
506
+ class="attribute-access-type">[RW]</span>
507
+ </div>
508
+
509
+ <div class="method-description">
510
+
511
+ <p>Attributes from the format</p>
512
+
513
+ </div>
514
+ </div>
515
+
516
+ <div id="attribute-i-samstr" class="method-detail">
517
+ <div class="method-heading attribute-method-heading">
518
+ <span class="method-name">samstr</span><span
519
+ class="attribute-access-type">[RW]</span>
520
+ </div>
521
+
522
+ <div class="method-description">
523
+
524
+ <p>Attributes from the format</p>
525
+
526
+ </div>
527
+ </div>
528
+
529
+ <div id="attribute-i-second_in_pair" class="method-detail">
530
+ <div class="method-heading attribute-method-heading">
531
+ <span class="method-name">second_in_pair</span><span
532
+ class="attribute-access-type">[RW]</span>
533
+ </div>
534
+
535
+ <div class="method-description">
536
+
537
+ <p>Attrobites frp, the flag field (see chapter 2.2.2 of the sam file
538
+ documentation) <a
539
+ href="Alignment.html#attribute-i-query_strand">#query_strand</a> and <a
540
+ href="Alignment.html#attribute-i-mate_strand">#mate_strand</a> are true if
541
+ they are forward. It is the opposite to the definition in the BAM format
542
+ for clarity. primary is the negation of is_negative from the BAM format</p>
543
+
544
+ </div>
545
+ </div>
546
+
547
+ <div id="attribute-i-seq" class="method-detail">
548
+ <div class="method-heading attribute-method-heading">
549
+ <span class="method-name">seq</span><span
550
+ class="attribute-access-type">[RW]</span>
551
+ </div>
552
+
553
+ <div class="method-description">
554
+
555
+ <p>Attributes from the format</p>
556
+
557
+ </div>
558
+ </div>
559
+
560
+ <div id="attribute-i-tags" class="method-detail">
561
+ <div class="method-heading attribute-method-heading">
562
+ <span class="method-name">tags</span><span
563
+ class="attribute-access-type">[RW]</span>
564
+ </div>
565
+
566
+ <div class="method-description">
567
+
568
+ <p>Attributes from the format</p>
569
+
570
+ </div>
571
+ </div>
572
+
573
+ </section><!-- attribute-method-details -->
574
+
575
+
576
+ <!-- Methods -->
577
+
578
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
579
+ <h3 class="section-header">Public Class Methods</h3>
580
+
581
+
582
+ <div id="method-c-finalize" class="method-detail ">
583
+
584
+ <div class="method-heading">
585
+ <span class="method-name">finalize</span><span
586
+ class="method-args">(object_id)</span>
587
+ <span class="method-click-advice">click to toggle source</span>
588
+ </div>
589
+
590
+
591
+ <div class="method-description">
592
+
593
+
594
+
595
+
596
+
597
+ <div class="method-source-code" id="finalize-source">
598
+ <pre><span class="ruby-comment"># File lib/bio/db/sam.rb, line 553</span>
599
+ <span class="ruby-keyword">def</span> <span class="ruby-constant">Alignment</span>.<span class="ruby-identifier">finalize</span>(<span class="ruby-identifier">object_id</span>)
600
+
601
+ <span class="ruby-comment"># puts &quot;Object #{object_id} dying at #{Time.new}&quot;</span>
602
+ <span class="ruby-comment"># p &quot;?&quot; . object_id.al</span>
603
+ <span class="ruby-comment"># p object_id.al</span>
604
+ <span class="ruby-constant">LibC</span>.<span class="ruby-identifier">free</span> <span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">al</span>
605
+ <span class="ruby-constant">LibC</span>.<span class="ruby-identifier">free</span> <span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">sam</span>
606
+ <span class="ruby-constant">LibC</span>.<span class="ruby-identifier">free</span> <span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">calend</span>
607
+ <span class="ruby-constant">LibC</span>.<span class="ruby-identifier">free</span> <span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">qlen</span>
608
+
609
+ <span class="ruby-constant">LibC</span>.<span class="ruby-identifier">free</span> <span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">samstr</span>
610
+ <span class="ruby-keyword">end</span></pre>
611
+ </div><!-- finalize-source -->
612
+
613
+ </div>
614
+
615
+
616
+
617
+
618
+ </div><!-- finalize-method -->
619
+
620
+
621
+ <div id="method-c-new" class="method-detail ">
622
+
623
+ <div class="method-heading">
624
+ <span class="method-name">new</span><span
625
+ class="method-args">()</span>
626
+ <span class="method-click-advice">click to toggle source</span>
627
+ </div>
628
+
629
+
630
+ <div class="method-description">
631
+
632
+
633
+
634
+
635
+
636
+ <div class="method-source-code" id="new-source">
637
+ <pre><span class="ruby-comment"># File lib/bio/db/sam.rb, line 549</span>
638
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
639
+ <span class="ruby-constant">ObjectSpace</span>.<span class="ruby-identifier">define_finalizer</span>(<span class="ruby-keyword">self</span>,
640
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">method</span>(<span class="ruby-value">:finalize</span>).<span class="ruby-identifier">to_proc</span>)
641
+ <span class="ruby-keyword">end</span></pre>
642
+ </div><!-- new-source -->
643
+
644
+ </div>
645
+
646
+
647
+
648
+
649
+ </div><!-- new-method -->
650
+
651
+
652
+ </section><!-- public-class-method-details -->
653
+
654
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
655
+ <h3 class="section-header">Public Instance Methods</h3>
656
+
657
+
658
+ <div id="method-i-sam-3D" class="method-detail ">
659
+
660
+ <div class="method-heading">
661
+ <span class="method-name">sam=</span><span
662
+ class="method-args">(sam)</span>
663
+ <span class="method-click-advice">click to toggle source</span>
664
+ </div>
665
+
666
+
667
+ <div class="method-description">
668
+
669
+
670
+
671
+
672
+
673
+ <div class="method-source-code" id="sam-3D-source">
674
+ <pre><span class="ruby-comment"># File lib/bio/db/sam.rb, line 607</span>
675
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">sam=</span>(<span class="ruby-identifier">sam</span>)
676
+ <span class="ruby-comment">#p sam</span>
677
+ <span class="ruby-identifier">s</span> = <span class="ruby-identifier">sam</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;\t&quot;</span>)
678
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">qname</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">0</span>]
679
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">flag</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_i</span>
680
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">rname</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">2</span>]
681
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">3</span>].<span class="ruby-identifier">to_i</span>
682
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">mapq</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">4</span>].<span class="ruby-identifier">to_i</span>
683
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">cigar</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">5</span>]
684
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">mrnm</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">6</span>]
685
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">mpos</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">7</span>].<span class="ruby-identifier">to_i</span>
686
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">isize</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">8</span>].<span class="ruby-identifier">to_i</span>
687
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">seq</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">9</span>]
688
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">qual</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">10</span>]
689
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">tags</span> = {}
690
+ <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>
691
+ <span class="ruby-identifier">t</span> = <span class="ruby-constant">Tag</span>.<span class="ruby-identifier">new</span>
692
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">s</span>[<span class="ruby-identifier">n</span>])
693
+ <span class="ruby-identifier">tags</span>[<span class="ruby-identifier">t</span>.<span class="ruby-identifier">tag</span>] = <span class="ruby-identifier">t</span>
694
+ }
695
+
696
+
697
+ <span class="ruby-comment">#&lt;QNAME&gt; &lt;FLAG&gt; &lt;RNAME&gt; &lt;POS&gt; &lt;MAPQ&gt; &lt;CIGAR&gt; &lt;MRNM&gt; &lt;MPOS&gt; &lt;ISIZE&gt; &lt;SEQ&gt; &lt;QUAL&gt; \</span>
698
+ <span class="ruby-comment">#[&lt;TAG&gt;:&lt;VTYPE&gt;:&lt;VALUE&gt; [...]] </span>
699
+
700
+ <span class="ruby-keyword">end</span></pre>
701
+ </div><!-- sam-3D-source -->
702
+
703
+ </div>
704
+
705
+
706
+
707
+
708
+ </div><!-- sam-3D-method -->
709
+
710
+
711
+ <div id="method-i-set" class="method-detail ">
712
+
713
+ <div class="method-heading">
714
+ <span class="method-name">set</span><span
715
+ class="method-args">(bam_alignment, header)</span>
716
+ <span class="method-click-advice">click to toggle source</span>
717
+ </div>
718
+
719
+
720
+ <div class="method-description">
721
+
722
+
723
+
724
+
725
+
726
+ <div class="method-source-code" id="set-source">
727
+ <pre><span class="ruby-comment"># File lib/bio/db/sam.rb, line 575</span>
728
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">set</span>(<span class="ruby-identifier">bam_alignment</span>, <span class="ruby-identifier">header</span>)
729
+ <span class="ruby-comment">#Create the FFI object</span>
730
+ <span class="ruby-ivar">@al</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">SAM</span><span class="ruby-operator">::</span><span class="ruby-constant">Tools</span><span class="ruby-operator">::</span><span class="ruby-constant">Bam1T</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bam_alignment</span>)
731
+
732
+ <span class="ruby-comment">#set the raw data</span>
733
+ <span class="ruby-identifier">tmp_str</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">SAM</span><span class="ruby-operator">::</span><span class="ruby-constant">Tools</span>.<span class="ruby-identifier">bam_format1</span>(<span class="ruby-identifier">header</span>,<span class="ruby-identifier">al</span>)
734
+ <span class="ruby-comment">#self.sam = tmp_str</span>
735
+ <span class="ruby-comment">#ObjectSpace.define_finalizer(self, proc {|id| puts &quot;Finalizer one on #{id}&quot; })</span>
736
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">sam</span> = <span class="ruby-constant">String</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">tmp_str</span>)
737
+ <span class="ruby-comment">#LibC.free tmp_str</span>
738
+ <span class="ruby-comment">#Set values calculated by libbam</span>
739
+ <span class="ruby-identifier">core</span> = <span class="ruby-identifier">al</span>[<span class="ruby-value">:core</span>]
740
+ <span class="ruby-identifier">cigar</span> = <span class="ruby-identifier">al</span>[<span class="ruby-value">:data</span>][<span class="ruby-identifier">core</span>[<span class="ruby-value">:l_qname</span>]]<span class="ruby-comment">#define bam1_cigar(b) ((uint32_t*)((b)-&gt;data + (b)-&gt;core.l_qname)) </span>
741
+ <span class="ruby-ivar">@calend</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">SAM</span><span class="ruby-operator">::</span><span class="ruby-constant">Tools</span>.<span class="ruby-identifier">bam_calend</span>(<span class="ruby-identifier">core</span>,<span class="ruby-identifier">cigar</span>)
742
+ <span class="ruby-ivar">@qlen</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">SAM</span><span class="ruby-operator">::</span><span class="ruby-constant">Tools</span>.<span class="ruby-identifier">bam_cigar2qlen</span>(<span class="ruby-identifier">core</span>,<span class="ruby-identifier">cigar</span>)
743
+
744
+ <span class="ruby-comment">#process the flags</span>
745
+ <span class="ruby-ivar">@is_paired</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0001</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
746
+ <span class="ruby-ivar">@is_mapped</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0002</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
747
+ <span class="ruby-ivar">@query_unmapped</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0004</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
748
+ <span class="ruby-ivar">@mate_unmapped</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0008</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
749
+ <span class="ruby-ivar">@query_strand</span> = <span class="ruby-operator">!</span>(<span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0010</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>)
750
+ <span class="ruby-ivar">@mate_strand</span> = <span class="ruby-operator">!</span>(<span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0020</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>)
751
+ <span class="ruby-ivar">@first_in_pair</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0040</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
752
+ <span class="ruby-ivar">@second_in_pair</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0080</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
753
+ <span class="ruby-ivar">@primary</span> = <span class="ruby-operator">!</span>(<span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0100</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>)
754
+ <span class="ruby-ivar">@failed_quality</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0200</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
755
+ <span class="ruby-ivar">@is_duplicate</span> = <span class="ruby-ivar">@flag</span> &amp; <span class="ruby-value">0x0400</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
756
+
757
+ <span class="ruby-keyword">end</span></pre>
758
+ </div><!-- set-source -->
759
+
760
+ </div>
761
+
762
+
763
+
764
+
765
+ </div><!-- set-method -->
766
+
767
+
768
+ </section><!-- public-instance-method-details -->
769
+
770
+ </section><!-- 5Buntitled-5D -->
771
+
772
+ </div><!-- documentation -->
773
+
774
+
775
+ <footer id="validator-badges">
776
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
777
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
778
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
779
+ </footer>
780
+