parse_fasta 0.0.5 → 1.0.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.
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: ParseFasta
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!ParseFasta.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (P)</a> &raquo;
35
+
36
+
37
+ <span class="title">ParseFasta</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: ParseFasta
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/parse_fasta/version.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>Copyright 2014 Ryan Moore Contact: moorer@udel.edu</p>
91
+
92
+ <p>This file is part of parse_fasta.</p>
93
+
94
+ <p>parse_fasta is free software: you can redistribute it and/or modify it
95
+ under the terms of the GNU General Public License as published by the Free
96
+ Software Foundation, either version 3 of the License, or (at your option)
97
+ any later version.</p>
98
+
99
+ <p>parse_fasta is distributed in the hope that it will be useful, but WITHOUT
100
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
101
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
102
+ more details.</p>
103
+
104
+ <p>You should have received a copy of the GNU General Public License along
105
+ with parse_fasta. If not, see &lt;<a
106
+ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/&gt;.</p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+ <h2>Constant Summary</h2>
116
+
117
+ <dl class="constants">
118
+
119
+ <dt id="VERSION-constant" class="">VERSION =
120
+
121
+ </dt>
122
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
123
+
124
+ </dl>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ </div>
136
+
137
+ <div id="footer">
138
+ Generated on Tue Jun 3 22:55:41 2014 by
139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
+ 0.8.7.4 (ruby-2.1.1).
141
+ </div>
142
+
143
+ </body>
144
+ </html>
data/doc/Sequence.html ADDED
@@ -0,0 +1,361 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Sequence
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!Sequence.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (S)</a> &raquo;
35
+
36
+
37
+ <span class="title">Sequence</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Sequence
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">String</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">String</li>
82
+
83
+ <li class="next">Sequence</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/parse_fasta/sequence.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Provide some methods for dealing with common tasks regarding nucleotide
108
+ sequences.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <h2>
125
+ Instance Method Summary
126
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
127
+ </h2>
128
+
129
+ <ul class="summary">
130
+
131
+ <li class="public ">
132
+ <span class="summary_signature">
133
+
134
+ <a href="#gc-instance_method" title="#gc (instance method)">- (0, Float) <strong>gc</strong> </a>
135
+
136
+
137
+
138
+ </span>
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'>
149
+ <p>Returns GC content for self.</p>
150
+ </div></span>
151
+
152
+ </li>
153
+
154
+
155
+ <li class="public ">
156
+ <span class="summary_signature">
157
+
158
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Sequence) <strong>initialize</strong>(str) </a>
159
+
160
+
161
+
162
+ </span>
163
+
164
+
165
+ <span class="note title constructor">constructor</span>
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <span class="summary_desc"><div class='inline'>
175
+ <p>A new instance of Sequence.</p>
176
+ </div></span>
177
+
178
+ </li>
179
+
180
+
181
+ </ul>
182
+
183
+
184
+
185
+ <div id="constructor_details" class="method_details_list">
186
+ <h2>Constructor Details</h2>
187
+
188
+ <div class="method_details first">
189
+ <h3 class="signature first" id="initialize-instance_method">
190
+
191
+ - (<tt><span class='object_link'><a href="" title="Sequence (class)">Sequence</a></span></tt>) <strong>initialize</strong>(str)
192
+
193
+
194
+
195
+
196
+
197
+ </h3><div class="docstring">
198
+ <div class="discussion">
199
+
200
+ <p>Returns a new instance of Sequence</p>
201
+
202
+
203
+ </div>
204
+ </div>
205
+ <div class="tags">
206
+
207
+
208
+ </div><table class="source_code">
209
+ <tr>
210
+ <td>
211
+ <pre class="lines">
212
+
213
+
214
+ 22
215
+ 23
216
+ 24</pre>
217
+ </td>
218
+ <td>
219
+ <pre class="code"><span class="info file"># File 'lib/parse_fasta/sequence.rb', line 22</span>
220
+
221
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span>
222
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span>
223
+ <span class='kw'>end</span></pre>
224
+ </td>
225
+ </tr>
226
+ </table>
227
+ </div>
228
+
229
+ </div>
230
+
231
+
232
+ <div id="instance_method_details" class="method_details_list">
233
+ <h2>Instance Method Details</h2>
234
+
235
+
236
+ <div class="method_details first">
237
+ <h3 class="signature first" id="gc-instance_method">
238
+
239
+ - (<tt>0</tt>, <tt>Float</tt>) <strong>gc</strong>
240
+
241
+
242
+
243
+
244
+
245
+ </h3><div class="docstring">
246
+ <div class="discussion">
247
+
248
+ <p>Returns GC content for self</p>
249
+
250
+ <p>Calculates GC content by dividing count of G + C divided by count of G + C
251
+ + T + A +U. If there are both T&#39;s and U&#39;s in the Sequence, things
252
+ will get weird, but then again, that wouldn&#39;t happen, now would it!</p>
253
+
254
+
255
+ </div>
256
+ </div>
257
+ <div class="tags">
258
+
259
+ <div class="examples">
260
+ <p class="tag_title">Examples:</p>
261
+
262
+
263
+ <p class="example_title"><div class='inline'>
264
+ <p>Get GC of a Sequence</p>
265
+ </div></p>
266
+
267
+ <pre class="example code"><code><span class='const'>Sequence</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ACTg</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gc'>gc</span> <span class='comment'>#=&gt; 0.5</span></code></pre>
268
+
269
+
270
+ <p class="example_title"><div class='inline'>
271
+ <p>Using with FastaFile#each_record</p>
272
+ </div></p>
273
+
274
+ <pre class="example code"><code><span class='const'>FastaFile</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>reads.fna</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>r</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each_record'>each_record</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_header'>header</span><span class='comma'>,</span> <span class='id identifier rubyid_sequence'>sequence</span><span class='op'>|</span>
275
+ <span class='id identifier rubyid_puts'>puts</span> <span class='lbracket'>[</span><span class='id identifier rubyid_header'>header</span><span class='comma'>,</span> <span class='id identifier rubyid_sequence'>sequence</span><span class='period'>.</span><span class='id identifier rubyid_gc'>gc</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\t</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
276
+ <span class='kw'>end</span></code></pre>
277
+
278
+ </div>
279
+
280
+ <p class="tag_title">Returns:</p>
281
+ <ul class="return">
282
+
283
+ <li>
284
+
285
+
286
+ <span class='type'>(<tt>0</tt>)</span>
287
+
288
+
289
+
290
+ &mdash;
291
+ <div class='inline'>
292
+ <p>if the Sequence is empty or there are no A, C, T, G or U present</p>
293
+ </div>
294
+
295
+ </li>
296
+
297
+ <li>
298
+
299
+
300
+ <span class='type'>(<tt>Float</tt>)</span>
301
+
302
+
303
+
304
+ &mdash;
305
+ <div class='inline'>
306
+ <p>if the GC content is defined for the Sequence</p>
307
+ </div>
308
+
309
+ </li>
310
+
311
+ </ul>
312
+
313
+ </div><table class="source_code">
314
+ <tr>
315
+ <td>
316
+ <pre class="lines">
317
+
318
+
319
+ 43
320
+ 44
321
+ 45
322
+ 46
323
+ 47
324
+ 48
325
+ 49
326
+ 50
327
+ 51
328
+ 52
329
+ 53</pre>
330
+ </td>
331
+ <td>
332
+ <pre class="code"><span class="info file"># File 'lib/parse_fasta/sequence.rb', line 43</span>
333
+
334
+ <span class='kw'>def</span> <span class='id identifier rubyid_gc'>gc</span>
335
+ <span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span>
336
+ <span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>c</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
337
+ <span class='id identifier rubyid_g'>g</span> <span class='op'>=</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>g</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
338
+ <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>t</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
339
+ <span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>a</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
340
+ <span class='id identifier rubyid_u'>u</span> <span class='op'>=</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>u</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
341
+
342
+ <span class='kw'>return</span> <span class='int'>0</span> <span class='kw'>if</span> <span class='id identifier rubyid_c'>c</span> <span class='op'>+</span> <span class='id identifier rubyid_g'>g</span> <span class='op'>+</span> <span class='id identifier rubyid_t'>t</span> <span class='op'>+</span> <span class='id identifier rubyid_a'>a</span> <span class='op'>+</span> <span class='id identifier rubyid_u'>u</span> <span class='op'>==</span> <span class='int'>0</span>
343
+ <span class='kw'>return</span> <span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span> <span class='op'>+</span> <span class='id identifier rubyid_g'>g</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_quo'>quo</span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span> <span class='op'>+</span> <span class='id identifier rubyid_g'>g</span> <span class='op'>+</span> <span class='id identifier rubyid_t'>t</span> <span class='op'>+</span> <span class='id identifier rubyid_a'>a</span> <span class='op'>+</span> <span class='id identifier rubyid_u'>u</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
344
+ <span class='kw'>end</span></pre>
345
+ </td>
346
+ </tr>
347
+ </table>
348
+ </div>
349
+
350
+ </div>
351
+
352
+ </div>
353
+
354
+ <div id="footer">
355
+ Generated on Tue Jun 3 22:55:41 2014 by
356
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
357
+ 0.8.7.4 (ruby-2.1.1).
358
+ </div>
359
+
360
+ </body>
361
+ </html>
data/doc/_index.html ADDED
@@ -0,0 +1,136 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Documentation by YARD 0.8.7.4
8
+
9
+ </title>
10
+
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
12
+
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
14
+
15
+ <script type="text/javascript" charset="utf-8">
16
+ hasFrames = window.top.frames.main ? true : false;
17
+ relpath = '';
18
+ framesUrl = "frames.html#!_index.html";
19
+ </script>
20
+
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <div id="header">
30
+ <div id="menu">
31
+
32
+
33
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
34
+ </div>
35
+
36
+ <div id="search">
37
+
38
+ <a class="full_list_link" id="class_list_link"
39
+ href="class_list.html">
40
+ Class List
41
+ </a>
42
+
43
+ <a class="full_list_link" id="method_list_link"
44
+ href="method_list.html">
45
+ Method List
46
+ </a>
47
+
48
+ <a class="full_list_link" id="file_list_link"
49
+ href="file_list.html">
50
+ File List
51
+ </a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.7.4</h1>
60
+ <div id="listing">
61
+ <h1 class="alphaindex">Alphabetic Index</h1>
62
+
63
+ <h2>File Listing</h2>
64
+ <ul id="files" class="index_inline_list">
65
+
66
+
67
+ <li class="r1"><a href="index.html" title="README">README</a></li>
68
+
69
+
70
+ </ul>
71
+
72
+ <div class="clear"></div>
73
+ <h2>Namespace Listing A-Z</h2>
74
+
75
+
76
+
77
+
78
+ <table>
79
+ <tr>
80
+ <td valign='top' width="33%">
81
+
82
+
83
+ <ul id="alpha_F" class="alpha">
84
+ <li class="letter">F</li>
85
+ <ul>
86
+
87
+ <li>
88
+ <span class='object_link'><a href="FastaFile.html" title="FastaFile (class)">FastaFile</a></span>
89
+
90
+ </li>
91
+
92
+ </ul>
93
+ </ul>
94
+
95
+
96
+ <ul id="alpha_P" class="alpha">
97
+ <li class="letter">P</li>
98
+ <ul>
99
+
100
+ <li>
101
+ <span class='object_link'><a href="ParseFasta.html" title="ParseFasta (module)">ParseFasta</a></span>
102
+
103
+ </li>
104
+
105
+ </ul>
106
+ </ul>
107
+
108
+
109
+ <ul id="alpha_S" class="alpha">
110
+ <li class="letter">S</li>
111
+ <ul>
112
+
113
+ <li>
114
+ <span class='object_link'><a href="Sequence.html" title="Sequence (class)">Sequence</a></span>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+ </ul>
120
+
121
+ </td>
122
+ </tr>
123
+ </table>
124
+
125
+ </div>
126
+
127
+ </div>
128
+
129
+ <div id="footer">
130
+ Generated on Tue Jun 3 22:55:41 2014 by
131
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
132
+ 0.8.7.4 (ruby-2.1.1).
133
+ </div>
134
+
135
+ </body>
136
+ </html>