simple_bioc 0.0.1 → 0.0.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.
- checksums.yaml +4 -4
- data/README.md +73 -3
- data/Rakefile +5 -0
- data/html/BioCReader.html +657 -0
- data/html/BioCWriter.html +556 -0
- data/html/README_md.html +231 -0
- data/html/SimpleBioC.html +255 -0
- data/html/SimpleBioC/Annotation.html +279 -0
- data/html/SimpleBioC/Collection.html +316 -0
- data/html/SimpleBioC/Document.html +426 -0
- data/html/SimpleBioC/Location.html +288 -0
- data/html/SimpleBioC/Node.html +334 -0
- data/html/SimpleBioC/NodeBase.html +281 -0
- data/html/SimpleBioC/Passage.html +418 -0
- data/html/SimpleBioC/Relation.html +301 -0
- data/html/SimpleBioC/Sentence.html +399 -0
- data/html/created.rid +15 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +212 -0
- data/html/js/darkfish.js +155 -0
- data/html/js/jquery.js +18 -0
- data/html/js/navigation.js +142 -0
- data/html/js/search.js +94 -0
- data/html/js/search_index.js +1 -0
- data/html/js/searcher.js +228 -0
- data/html/rdoc.css +595 -0
- data/html/table_of_contents.html +199 -0
- data/lib/simple_bioc.rb +4 -0
- data/lib/simple_bioc/annotation.rb +10 -6
- data/lib/simple_bioc/bioc_reader.rb +2 -2
- data/lib/simple_bioc/collection.rb +13 -11
- data/lib/simple_bioc/document.rb +31 -22
- data/lib/simple_bioc/location.rb +13 -7
- data/lib/simple_bioc/node.rb +14 -8
- data/lib/simple_bioc/node_base.rb +13 -10
- data/lib/simple_bioc/passage.rb +26 -23
- data/lib/simple_bioc/relation.rb +13 -8
- data/lib/simple_bioc/sentence.rb +21 -15
- data/lib/simple_bioc/version.rb +2 -2
- data/samples/print_annotation.rb +18 -0
- data/samples/sample1.rb +31 -0
- data/simple_bioc.gemspec +1 -1
- metadata +52 -2
data/html/README_md.html
ADDED
@@ -0,0 +1,231 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>README - 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 class="file">
|
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
|
+
|
47
|
+
<div id="table-of-contents">
|
48
|
+
<nav class="section">
|
49
|
+
<h3 class="section-header">Table of Contents</h3>
|
50
|
+
<ul>
|
51
|
+
<li><a href="#label-SimpleBioc">SimpleBioc</a>
|
52
|
+
<li><a href="#label-Feature%3A">Feature:</a>
|
53
|
+
<li><a href="#label-Installation">Installation</a>
|
54
|
+
<li><a href="#label-Usages">Usages</a>
|
55
|
+
<li><a href="#label-Sample">Sample</a>
|
56
|
+
<li><a href="#label-Contributing">Contributing</a>
|
57
|
+
<li><a href="#label-LICENSE">LICENSE</a>
|
58
|
+
</ul>
|
59
|
+
</nav>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<div id="project-metadata">
|
64
|
+
<nav id="fileindex-section" class="section project-section">
|
65
|
+
<h3 class="section-header">Pages</h3>
|
66
|
+
|
67
|
+
<ul>
|
68
|
+
|
69
|
+
<li class="file"><a href="./README_md.html">README</a>
|
70
|
+
|
71
|
+
</ul>
|
72
|
+
</nav>
|
73
|
+
|
74
|
+
<nav id="classindex-section" class="section project-section">
|
75
|
+
<h3 class="section-header">Class and Module Index</h3>
|
76
|
+
|
77
|
+
<ul class="link-list">
|
78
|
+
|
79
|
+
<li><a href="./BioCReader.html">BioCReader</a>
|
80
|
+
|
81
|
+
<li><a href="./BioCWriter.html">BioCWriter</a>
|
82
|
+
|
83
|
+
<li><a href="./SimpleBioC.html">SimpleBioC</a>
|
84
|
+
|
85
|
+
<li><a href="./SimpleBioC/Annotation.html">SimpleBioC::Annotation</a>
|
86
|
+
|
87
|
+
<li><a href="./SimpleBioC/Collection.html">SimpleBioC::Collection</a>
|
88
|
+
|
89
|
+
<li><a href="./SimpleBioC/Document.html">SimpleBioC::Document</a>
|
90
|
+
|
91
|
+
<li><a href="./SimpleBioC/Location.html">SimpleBioC::Location</a>
|
92
|
+
|
93
|
+
<li><a href="./SimpleBioC/Node.html">SimpleBioC::Node</a>
|
94
|
+
|
95
|
+
<li><a href="./SimpleBioC/NodeBase.html">SimpleBioC::NodeBase</a>
|
96
|
+
|
97
|
+
<li><a href="./SimpleBioC/Passage.html">SimpleBioC::Passage</a>
|
98
|
+
|
99
|
+
<li><a href="./SimpleBioC/Relation.html">SimpleBioC::Relation</a>
|
100
|
+
|
101
|
+
<li><a href="./SimpleBioC/Sentence.html">SimpleBioC::Sentence</a>
|
102
|
+
|
103
|
+
</ul>
|
104
|
+
</nav>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
</nav>
|
108
|
+
|
109
|
+
<div id="documentation" class="description">
|
110
|
+
|
111
|
+
<h1 id="label-SimpleBioc">SimpleBioc<span><a href="#label-SimpleBioc">¶</a> <a href="#documentation">↑</a></span></h1>
|
112
|
+
|
113
|
+
<p><a href="SimpleBioC.html">SimpleBioC</a> is a simple parser / builder for
|
114
|
+
BioC data format. BioC is a simple XML format to share text documents and
|
115
|
+
annotations. You can find more information about BioC from the official
|
116
|
+
BioC web site (<a
|
117
|
+
href="http://www.ncbi.nlm.nih.gov/CBBresearch/Dogan/BioC/">www.ncbi.nlm.nih.gov/CBBresearch/Dogan/BioC/</a>)</p>
|
118
|
+
|
119
|
+
<h2 id="label-Feature%3A">Feature:<span><a href="#label-Feature%3A">¶</a> <a href="#documentation">↑</a></span></h2>
|
120
|
+
<ul><li>
|
121
|
+
<p>Parse & convert a BioC document to an object instance compatible to
|
122
|
+
BioC DTD</p>
|
123
|
+
</li><li>
|
124
|
+
<p>Use plain ruby objects for simplicity</p>
|
125
|
+
</li><li>
|
126
|
+
<p>Build a BioC document from an object instance</p>
|
127
|
+
</li></ul>
|
128
|
+
|
129
|
+
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#documentation">↑</a></span></h2>
|
130
|
+
|
131
|
+
<p>Add this line to your application's Gemfile:</p>
|
132
|
+
|
133
|
+
<pre>gem 'simple_bioc'</pre>
|
134
|
+
|
135
|
+
<p>And then execute:</p>
|
136
|
+
|
137
|
+
<pre>$ bundle</pre>
|
138
|
+
|
139
|
+
<p>Or install it yourself as:</p>
|
140
|
+
|
141
|
+
<pre>$ gem install simple_bioc</pre>
|
142
|
+
|
143
|
+
<h2 id="label-Usages">Usages<span><a href="#label-Usages">¶</a> <a href="#documentation">↑</a></span></h2>
|
144
|
+
|
145
|
+
<p>Include library</p>
|
146
|
+
|
147
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'simple_bioc'</span>
|
148
|
+
</pre>
|
149
|
+
|
150
|
+
<p>Parse with a file name (path)</p>
|
151
|
+
|
152
|
+
<pre>collection = SimpleBioC::from_xml(filename)</pre>
|
153
|
+
|
154
|
+
<p>Traverse & Manipulate Data. Data structure are almost the same as the
|
155
|
+
DTD. Please refer <a href="http://">library documents</a>.</p>
|
156
|
+
|
157
|
+
<pre>puts collection.documents[2].passages[0].text</pre>
|
158
|
+
|
159
|
+
<p>Build XML text from data</p>
|
160
|
+
|
161
|
+
<pre>puts SimpleBioC::to_xml(collection)</pre>
|
162
|
+
|
163
|
+
<h2 id="label-Sample">Sample<span><a href="#label-Sample">¶</a> <a href="#documentation">↑</a></span></h2>
|
164
|
+
|
165
|
+
<p>More samples can be found in Samples directory</p>
|
166
|
+
|
167
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'simple_bioc'</span>
|
168
|
+
|
169
|
+
<span class="ruby-comment"># Sample1: parse, traverse, manipulate, and build BioC data</span>
|
170
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'simple_bioc'</span>
|
171
|
+
|
172
|
+
<span class="ruby-comment"># parse BioC file</span>
|
173
|
+
<span class="ruby-identifier">collection</span> = <span class="ruby-constant">SimpleBioC</span>.<span class="ruby-identifier">from_xml</span>(<span class="ruby-string">"../xml/everything.xml"</span>)
|
174
|
+
|
175
|
+
<span class="ruby-comment"># the returned object contains all the information in the BioC file</span>
|
176
|
+
<span class="ruby-comment"># traverse & read information</span>
|
177
|
+
<span class="ruby-identifier">collection</span>.<span class="ruby-identifier">documents</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">document</span><span class="ruby-operator">|</span>
|
178
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">document</span>
|
179
|
+
<span class="ruby-identifier">document</span>.<span class="ruby-identifier">passages</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">passage</span><span class="ruby-operator">|</span>
|
180
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">passage</span>
|
181
|
+
<span class="ruby-keyword">end</span>
|
182
|
+
<span class="ruby-keyword">end</span>
|
183
|
+
|
184
|
+
<span class="ruby-comment"># manipulate </span>
|
185
|
+
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">SimpleBioC</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">collection</span>)
|
186
|
+
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">id</span> = <span class="ruby-string">"23071747"</span>
|
187
|
+
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">infons</span>[<span class="ruby-string">"journal"</span>] = <span class="ruby-string">"PLoS One"</span>
|
188
|
+
<span class="ruby-identifier">collection</span>.<span class="ruby-identifier">documents</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">doc</span>
|
189
|
+
|
190
|
+
<span class="ruby-identifier">p</span> = <span class="ruby-constant">SimpleBioC</span><span class="ruby-operator">::</span><span class="ruby-constant">Passage</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">doc</span>)
|
191
|
+
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>
|
192
|
+
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">text</span> = <span class="ruby-string">"TRIP database 2.0: a manually curated information hub for accessing TRP channel interaction network."</span>
|
193
|
+
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">infons</span>[<span class="ruby-string">"type"</span>] = <span class="ruby-string">"title"</span>
|
194
|
+
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">passages</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">p</span>
|
195
|
+
|
196
|
+
|
197
|
+
<span class="ruby-comment"># build BioC document from data</span>
|
198
|
+
<span class="ruby-identifier">xml</span> = <span class="ruby-constant">SimpleBioC</span>.<span class="ruby-identifier">to_xml</span>(<span class="ruby-identifier">collection</span>)
|
199
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">xml</span>
|
200
|
+
</pre>
|
201
|
+
|
202
|
+
<h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">¶</a> <a href="#documentation">↑</a></span></h2>
|
203
|
+
<ol><li>
|
204
|
+
<p>Fork it</p>
|
205
|
+
</li><li>
|
206
|
+
<p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
|
207
|
+
</li><li>
|
208
|
+
<p>Commit your changes (<code>git commit -am 'Add some
|
209
|
+
feature'</code>)</p>
|
210
|
+
</li><li>
|
211
|
+
<p>Push to the branch (<code>git push origin my-new-feature</code>)</p>
|
212
|
+
</li><li>
|
213
|
+
<p>Create new Pull Request</p>
|
214
|
+
</li></ol>
|
215
|
+
|
216
|
+
<h2 id="label-LICENSE">LICENSE<span><a href="#label-LICENSE">¶</a> <a href="#documentation">↑</a></span></h2>
|
217
|
+
|
218
|
+
<p>Copyright © 2013, Dongseop Kwon</p>
|
219
|
+
|
220
|
+
<p>Released under the MIT License.</p>
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
<footer id="validator-badges">
|
227
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
228
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
229
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
230
|
+
</footer>
|
231
|
+
|
@@ -0,0 +1,255 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>module SimpleBioC - 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="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
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/simple_bioc.rb
|
53
|
+
<li>lib/simple_bioc/annotation.rb
|
54
|
+
<li>lib/simple_bioc/bioc_reader.rb
|
55
|
+
<li>lib/simple_bioc/collection.rb
|
56
|
+
<li>lib/simple_bioc/document.rb
|
57
|
+
<li>lib/simple_bioc/location.rb
|
58
|
+
<li>lib/simple_bioc/node.rb
|
59
|
+
<li>lib/simple_bioc/node_base.rb
|
60
|
+
<li>lib/simple_bioc/passage.rb
|
61
|
+
<li>lib/simple_bioc/relation.rb
|
62
|
+
<li>lib/simple_bioc/sentence.rb
|
63
|
+
<li>lib/simple_bioc/version.rb
|
64
|
+
</ul>
|
65
|
+
</nav>
|
66
|
+
|
67
|
+
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<div id="class-metadata">
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<!-- Method Quickref -->
|
76
|
+
<nav id="method-list-section" class="section">
|
77
|
+
<h3 class="section-header">Methods</h3>
|
78
|
+
|
79
|
+
<ul class="link-list">
|
80
|
+
|
81
|
+
<li ><a href="#method-i-from_xml">#from_xml</a>
|
82
|
+
|
83
|
+
<li ><a href="#method-i-to_xml">#to_xml</a>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
</nav>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
<div id="project-metadata">
|
91
|
+
<nav id="fileindex-section" class="section project-section">
|
92
|
+
<h3 class="section-header">Pages</h3>
|
93
|
+
|
94
|
+
<ul>
|
95
|
+
|
96
|
+
<li class="file"><a href="./README_md.html">README</a>
|
97
|
+
|
98
|
+
</ul>
|
99
|
+
</nav>
|
100
|
+
|
101
|
+
<nav id="classindex-section" class="section project-section">
|
102
|
+
<h3 class="section-header">Class and Module Index</h3>
|
103
|
+
|
104
|
+
<ul class="link-list">
|
105
|
+
|
106
|
+
<li><a href="./BioCReader.html">BioCReader</a>
|
107
|
+
|
108
|
+
<li><a href="./BioCWriter.html">BioCWriter</a>
|
109
|
+
|
110
|
+
<li><a href="./SimpleBioC.html">SimpleBioC</a>
|
111
|
+
|
112
|
+
<li><a href="./SimpleBioC/Annotation.html">SimpleBioC::Annotation</a>
|
113
|
+
|
114
|
+
<li><a href="./SimpleBioC/Collection.html">SimpleBioC::Collection</a>
|
115
|
+
|
116
|
+
<li><a href="./SimpleBioC/Document.html">SimpleBioC::Document</a>
|
117
|
+
|
118
|
+
<li><a href="./SimpleBioC/Location.html">SimpleBioC::Location</a>
|
119
|
+
|
120
|
+
<li><a href="./SimpleBioC/Node.html">SimpleBioC::Node</a>
|
121
|
+
|
122
|
+
<li><a href="./SimpleBioC/NodeBase.html">SimpleBioC::NodeBase</a>
|
123
|
+
|
124
|
+
<li><a href="./SimpleBioC/Passage.html">SimpleBioC::Passage</a>
|
125
|
+
|
126
|
+
<li><a href="./SimpleBioC/Relation.html">SimpleBioC::Relation</a>
|
127
|
+
|
128
|
+
<li><a href="./SimpleBioC/Sentence.html">SimpleBioC::Sentence</a>
|
129
|
+
|
130
|
+
</ul>
|
131
|
+
</nav>
|
132
|
+
|
133
|
+
</div>
|
134
|
+
</nav>
|
135
|
+
|
136
|
+
<div id="documentation">
|
137
|
+
<h1 class="module">module SimpleBioC</h1>
|
138
|
+
|
139
|
+
<div id="description" class="description">
|
140
|
+
|
141
|
+
<p><a href="SimpleBioC.html">SimpleBioC</a> main library</p>
|
142
|
+
|
143
|
+
</div><!-- description -->
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<!-- Constants -->
|
155
|
+
<section id="constants-list" class="section">
|
156
|
+
<h3 class="section-header">Constants</h3>
|
157
|
+
<dl>
|
158
|
+
|
159
|
+
<dt id="VERSION">VERSION
|
160
|
+
|
161
|
+
<dd class="description">
|
162
|
+
|
163
|
+
|
164
|
+
</dl>
|
165
|
+
</section>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<!-- Methods -->
|
171
|
+
|
172
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
173
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
174
|
+
|
175
|
+
|
176
|
+
<div id="method-i-from_xml" class="method-detail ">
|
177
|
+
|
178
|
+
<div class="method-heading">
|
179
|
+
<span class="method-name">from_xml</span><span
|
180
|
+
class="method-args">(file_path)</span>
|
181
|
+
|
182
|
+
<span class="method-click-advice">click to toggle source</span>
|
183
|
+
|
184
|
+
</div>
|
185
|
+
|
186
|
+
|
187
|
+
<div class="method-description">
|
188
|
+
|
189
|
+
<p>parse a BioC XML file in the given path and convert it into a collection
|
190
|
+
instance</p>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<div class="method-source-code" id="from_xml-source">
|
196
|
+
<pre><span class="ruby-comment"># File lib/simple_bioc.rb, line 10</span>
|
197
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">file_path</span>)
|
198
|
+
<span class="ruby-constant">BioCReader</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">file_path</span>)
|
199
|
+
<span class="ruby-keyword">end</span></pre>
|
200
|
+
</div><!-- from_xml-source -->
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</div><!-- from_xml-method -->
|
208
|
+
|
209
|
+
|
210
|
+
<div id="method-i-to_xml" class="method-detail ">
|
211
|
+
|
212
|
+
<div class="method-heading">
|
213
|
+
<span class="method-name">to_xml</span><span
|
214
|
+
class="method-args">(collection)</span>
|
215
|
+
|
216
|
+
<span class="method-click-advice">click to toggle source</span>
|
217
|
+
|
218
|
+
</div>
|
219
|
+
|
220
|
+
|
221
|
+
<div class="method-description">
|
222
|
+
|
223
|
+
<p>convert a collection instance to a BioC XML text</p>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
<div class="method-source-code" id="to_xml-source">
|
229
|
+
<pre><span class="ruby-comment"># File lib/simple_bioc.rb, line 15</span>
|
230
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_xml</span>(<span class="ruby-identifier">collection</span>)
|
231
|
+
<span class="ruby-constant">BioCWriter</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">collection</span>)
|
232
|
+
<span class="ruby-keyword">end</span></pre>
|
233
|
+
</div><!-- to_xml-source -->
|
234
|
+
|
235
|
+
</div>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
</div><!-- to_xml-method -->
|
241
|
+
|
242
|
+
|
243
|
+
</section><!-- public-instance-method-details -->
|
244
|
+
|
245
|
+
</section><!-- 5Buntitled-5D -->
|
246
|
+
|
247
|
+
</div><!-- documentation -->
|
248
|
+
|
249
|
+
|
250
|
+
<footer id="validator-badges">
|
251
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
252
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
253
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
254
|
+
</footer>
|
255
|
+
|