genevalidator 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/.travis.yml +2 -0
  4. data/README.md +78 -30
  5. data/Rakefile +11 -8
  6. data/aux/app_template_footer.erb +1 -6
  7. data/aux/app_template_header.erb +12 -32
  8. data/aux/files/css/style.css +2 -8
  9. data/aux/files/js/plots.js +564 -576
  10. data/aux/files/js/script.js +10 -0
  11. data/aux/json_footer.erb +8 -0
  12. data/aux/json_header.erb +19 -0
  13. data/aux/json_query.erb +14 -0
  14. data/aux/template_footer.erb +9 -58
  15. data/aux/template_header.erb +18 -58
  16. data/aux/template_query.erb +8 -36
  17. data/bin/genevalidator +45 -32
  18. data/genevalidator.gemspec +11 -7
  19. data/lib/genevalidator.rb +75 -455
  20. data/lib/genevalidator/arg_validation.rb +78 -107
  21. data/lib/genevalidator/blast.rb +57 -60
  22. data/lib/genevalidator/clusterization.rb +15 -15
  23. data/lib/genevalidator/exceptions.rb +32 -5
  24. data/lib/genevalidator/get_raw_sequences.rb +70 -33
  25. data/lib/genevalidator/hsp.rb +1 -4
  26. data/lib/genevalidator/json_to_gv_results.rb +109 -0
  27. data/lib/genevalidator/output.rb +177 -185
  28. data/lib/genevalidator/pool.rb +2 -1
  29. data/lib/genevalidator/sequences.rb +3 -3
  30. data/lib/genevalidator/tabular_parser.rb +24 -18
  31. data/lib/genevalidator/validation.rb +279 -0
  32. data/lib/genevalidator/validation_alignment.rb +31 -47
  33. data/lib/genevalidator/validation_blast_reading_frame.rb +19 -18
  34. data/lib/genevalidator/validation_duplication.rb +23 -19
  35. data/lib/genevalidator/validation_gene_merge.rb +30 -65
  36. data/lib/genevalidator/validation_length_cluster.rb +14 -53
  37. data/lib/genevalidator/validation_length_rank.rb +10 -11
  38. data/lib/genevalidator/validation_open_reading_frame.rb +18 -19
  39. data/lib/genevalidator/validation_report.rb +2 -5
  40. data/lib/genevalidator/validation_test.rb +8 -4
  41. data/lib/genevalidator/version.rb +1 -1
  42. data/test/test_all_validations.rb +51 -66
  43. data/test/test_blast.rb +68 -51
  44. data/test/test_clusterization.rb +1 -1
  45. data/test/test_clusterization_2d.rb +19 -13
  46. data/test/test_extended_array_methods.rb +1 -1
  47. data/test/test_files/all_validations_mrna/mrna.blast_tab6 +1806 -0
  48. data/test/test_files/all_validations_mrna/mrna.blast_tab7 +1865 -0
  49. data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta.blast_xml → mrna.blast_xml} +18642 -1
  50. data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta.blast_xml.index → mrna.blast_xml.index} +300 -0
  51. data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta → mrna.fa} +0 -0
  52. data/test/test_files/all_validations_mrna/mrna.raw_seq +3970 -0
  53. data/test/test_files/all_validations_mrna/{all_validations_mrna.fasta.blast_xml.raw_seq.idx → mrna.raw_seq.idx} +901 -1
  54. data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_tab → prot.blast_tab6} +416 -0
  55. data/test/test_files/all_validations_prot/prot.blast_tab7 +2400 -0
  56. data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml → prot.blast_xml} +18299 -6723
  57. data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml.index → prot.blast_xml.index} +408 -0
  58. data/test/test_files/all_validations_prot/{all_validations_prot.fasta → prot.fa} +0 -0
  59. data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml.raw_seq → prot.raw_seq} +2735 -0
  60. data/test/test_files/all_validations_prot/{all_validations_prot.fasta.blast_xml.raw_seq.idx → prot.raw_seq.idx} +3032 -1808
  61. data/test/test_sequences.rb +46 -41
  62. data/test/test_validation_open_reading_frame.rb +318 -202
  63. data/test/test_validations.rb +48 -32
  64. metadata +76 -102
  65. data/doc/AliasDuplicationError.html +0 -134
  66. data/doc/AlignmentValidation.html +0 -1687
  67. data/doc/AlignmentValidationOutput.html +0 -659
  68. data/doc/Blast.html +0 -1905
  69. data/doc/BlastRFValidationOutput.html +0 -545
  70. data/doc/BlastReadingFrameValidation.html +0 -370
  71. data/doc/BlastUtils.html +0 -875
  72. data/doc/ClasspathError.html +0 -134
  73. data/doc/Cluster.html +0 -1316
  74. data/doc/DuplciationValidationOutput.html +0 -564
  75. data/doc/DuplicationValidation.html +0 -920
  76. data/doc/DuplicationValidationOutput.html +0 -564
  77. data/doc/FileNotFoundException.html +0 -134
  78. data/doc/GeneMergeValidation.html +0 -935
  79. data/doc/GeneMergeValidationOutput.html +0 -652
  80. data/doc/HierarchicalClusterization.html +0 -994
  81. data/doc/Hsp.html +0 -1485
  82. data/doc/InconsistentTabularFormat.html +0 -135
  83. data/doc/LengthClusterValidation.html +0 -982
  84. data/doc/LengthClusterValidationOutput.html +0 -515
  85. data/doc/LengthRankValidation.html +0 -496
  86. data/doc/LengthRankValidationOutput.html +0 -517
  87. data/doc/NoInternetError.html +0 -135
  88. data/doc/NoMafftInstallationError.html +0 -134
  89. data/doc/NoPIdentError.html +0 -134
  90. data/doc/NoValidationError.html +0 -134
  91. data/doc/NotEnoughHitsError.html +0 -135
  92. data/doc/ORFValidationOutput.html +0 -593
  93. data/doc/OpenReadingFrameValidation.html +0 -1107
  94. data/doc/OtherError.html +0 -123
  95. data/doc/Output.html +0 -1540
  96. data/doc/Pair.html +0 -309
  97. data/doc/PairCluster.html +0 -767
  98. data/doc/Plot.html +0 -837
  99. data/doc/QueryError.html +0 -134
  100. data/doc/ReportClassError.html +0 -135
  101. data/doc/Sequence.html +0 -1299
  102. data/doc/SequenceTypeError.html +0 -135
  103. data/doc/TabularEntry.html +0 -837
  104. data/doc/TabularParser.html +0 -1104
  105. data/doc/Validation.html +0 -2147
  106. data/doc/ValidationClassError.html +0 -134
  107. data/doc/ValidationOutput.html +0 -460
  108. data/doc/ValidationReport.html +0 -940
  109. data/doc/ValidationTest.html +0 -939
  110. data/doc/_index.html +0 -449
  111. data/doc/class_list.html +0 -54
  112. data/doc/css/common.css +0 -1
  113. data/doc/css/full_list.css +0 -57
  114. data/doc/css/style.css +0 -338
  115. data/doc/file.README.html +0 -151
  116. data/doc/file_list.html +0 -56
  117. data/doc/frames.html +0 -26
  118. data/doc/index.html +0 -151
  119. data/doc/js/app.js +0 -214
  120. data/doc/js/full_list.js +0 -178
  121. data/doc/js/jquery.js +0 -4
  122. data/doc/method_list.html +0 -1505
  123. data/doc/top-level-namespace.html +0 -112
  124. data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab +0 -967
  125. data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab.index +0 -967
  126. data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab.raw_seq +0 -4929
  127. data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_tab.raw_seq.idx +0 -1006
  128. data/test/test_files/all_validations_mrna/all_validations_mrna.fasta.blast_xml.raw_seq +0 -2075
  129. data/test/test_files/all_validations_prot/all_validations_prot.fasta.blast_tab.index +0 -1864
  130. data/test/test_files/all_validations_prot/all_validations_prot.fasta.blast_tab.raw_seq +0 -42411
  131. data/test/test_files/all_validations_prot/all_validations_prot.fasta.blast_tab.raw_seq.idx +0 -3751
@@ -1,134 +0,0 @@
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
- Exception: QueryError
8
-
9
- &mdash; Documentation by YARD 0.8.7.2
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#!" + escape(window.location.href);
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 (Q)</a> &raquo;
35
-
36
-
37
- <span class="title">QueryError</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>Exception: QueryError
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">Exception</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Exception</li>
82
-
83
- <li class="next">QueryError</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/genevalidator/exceptions.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>Exception raised when blast does not find any hit</p>
108
-
109
-
110
- </div>
111
- </div>
112
- <div class="tags">
113
-
114
-
115
- </div>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
- </div>
126
-
127
- <div id="footer">
128
- Generated on Sat Sep 28 07:01:32 2013 by
129
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
- 0.8.7.2 (ruby-1.9.3).
131
- </div>
132
-
133
- </body>
134
- </html>
@@ -1,135 +0,0 @@
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
- Exception: ReportClassError
8
-
9
- &mdash; Documentation by YARD 0.8.7.2
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#!" + escape(window.location.href);
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 (R)</a> &raquo;
35
-
36
-
37
- <span class="title">ReportClassError</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>Exception: ReportClassError
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">Exception</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Exception</li>
82
-
83
- <li class="next">ReportClassError</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/genevalidator/exceptions.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>Exception raised when a validation report class is not instance of
108
- ValidationReport</p>
109
-
110
-
111
- </div>
112
- </div>
113
- <div class="tags">
114
-
115
-
116
- </div>
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
- </div>
127
-
128
- <div id="footer">
129
- Generated on Sat Sep 28 07:01:32 2013 by
130
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
131
- 0.8.7.2 (ruby-1.9.3).
132
- </div>
133
-
134
- </body>
135
- </html>
@@ -1,1299 +0,0 @@
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.2
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#!" + escape(window.location.href);
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">Object</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Sequence</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/genevalidator/sequences.rb</dd>
98
-
99
- </dl>
100
- <div class="clear"></div>
101
-
102
-
103
-
104
-
105
-
106
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
107
- <ul class="summary">
108
-
109
- <li class="public ">
110
- <span class="summary_signature">
111
-
112
- <a href="#accession_no-instance_method" title="#accession_no (instance method)">- (Object) <strong>accession_no</strong> </a>
113
-
114
-
115
-
116
- </span>
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
- <span class="summary_desc"><div class='inline'>
130
- <p>Returns the value of attribute accession_no.</p>
131
- </div></span>
132
-
133
- </li>
134
-
135
-
136
- <li class="public ">
137
- <span class="summary_signature">
138
-
139
- <a href="#definition-instance_method" title="#definition (instance method)">- (Object) <strong>definition</strong> </a>
140
-
141
-
142
-
143
- </span>
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
- <span class="summary_desc"><div class='inline'>
157
- <p>Returns the value of attribute definition.</p>
158
- </div></span>
159
-
160
- </li>
161
-
162
-
163
- <li class="public ">
164
- <span class="summary_signature">
165
-
166
- <a href="#hsp_list-instance_method" title="#hsp_list (instance method)">- (Object) <strong>hsp_list</strong> </a>
167
-
168
-
169
-
170
- </span>
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
- <span class="summary_desc"><div class='inline'>
184
- <p>array of Hsp objects.</p>
185
- </div></span>
186
-
187
- </li>
188
-
189
-
190
- <li class="public ">
191
- <span class="summary_signature">
192
-
193
- <a href="#identifier-instance_method" title="#identifier (instance method)">- (Object) <strong>identifier</strong> </a>
194
-
195
-
196
-
197
- </span>
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- <span class="summary_desc"><div class='inline'>
211
- <p>Returns the value of attribute identifier.</p>
212
- </div></span>
213
-
214
- </li>
215
-
216
-
217
- <li class="public ">
218
- <span class="summary_signature">
219
-
220
- <a href="#length_protein-instance_method" title="#length_protein (instance method)">- (Object) <strong>length_protein</strong> </a>
221
-
222
-
223
-
224
- </span>
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
- <span class="summary_desc"><div class='inline'>
238
- <p>Returns the value of attribute length_protein.</p>
239
- </div></span>
240
-
241
- </li>
242
-
243
-
244
- <li class="public ">
245
- <span class="summary_signature">
246
-
247
- <a href="#nucleotide_rf-instance_method" title="#nucleotide_rf (instance method)">- (Object) <strong>nucleotide_rf</strong> </a>
248
-
249
-
250
-
251
- </span>
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
- <span class="summary_desc"><div class='inline'>
265
- <p>used only for nucleotides.</p>
266
- </div></span>
267
-
268
- </li>
269
-
270
-
271
- <li class="public ">
272
- <span class="summary_signature">
273
-
274
- <a href="#protein_translation-instance_method" title="#protein_translation (instance method)">- (Object) <strong>protein_translation</strong> </a>
275
-
276
-
277
-
278
- </span>
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
- <span class="summary_desc"><div class='inline'>
292
- <p>used only for nucleotides.</p>
293
- </div></span>
294
-
295
- </li>
296
-
297
-
298
- <li class="public ">
299
- <span class="summary_signature">
300
-
301
- <a href="#raw_sequence-instance_method" title="#raw_sequence (instance method)">- (Object) <strong>raw_sequence</strong> </a>
302
-
303
-
304
-
305
- </span>
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
- <span class="summary_desc"><div class='inline'>
319
- <p>Returns the value of attribute raw_sequence.</p>
320
- </div></span>
321
-
322
- </li>
323
-
324
-
325
- <li class="public ">
326
- <span class="summary_signature">
327
-
328
- <a href="#reading_frame-instance_method" title="#reading_frame (instance method)">- (Object) <strong>reading_frame</strong> </a>
329
-
330
-
331
-
332
- </span>
333
-
334
-
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
- <span class="summary_desc"><div class='inline'>
346
- <p>Returns the value of attribute reading_frame.</p>
347
- </div></span>
348
-
349
- </li>
350
-
351
-
352
- <li class="public ">
353
- <span class="summary_signature">
354
-
355
- <a href="#species-instance_method" title="#species (instance method)">- (Object) <strong>species</strong> </a>
356
-
357
-
358
-
359
- </span>
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
- <span class="summary_desc"><div class='inline'>
373
- <p>Returns the value of attribute species.</p>
374
- </div></span>
375
-
376
- </li>
377
-
378
-
379
- <li class="public ">
380
- <span class="summary_signature">
381
-
382
- <a href="#type-instance_method" title="#type (instance method)">- (Object) <strong>type</strong> </a>
383
-
384
-
385
-
386
- </span>
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
-
398
-
399
- <span class="summary_desc"><div class='inline'>
400
- <p>protein | mRNA.</p>
401
- </div></span>
402
-
403
- </li>
404
-
405
-
406
- </ul>
407
-
408
-
409
-
410
-
411
-
412
- <h2>
413
- Instance Method Summary
414
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
415
- </h2>
416
-
417
- <ul class="summary">
418
-
419
- <li class="public ">
420
- <span class="summary_signature">
421
-
422
- <a href="#get_sequence_by_accession_no-instance_method" title="#get_sequence_by_accession_no (instance method)">- (Object) <strong>get_sequence_by_accession_no</strong>(accno, db) </a>
423
-
424
-
425
-
426
- </span>
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
-
436
- <span class="summary_desc"><div class='inline'>
437
- <p>Gets raw sequence by accession number from a givem database Params:
438
- <tt>accno</tt>: accession number as String <tt>db</tt>: database as String
439
- Output: String with the nucleotide sequence corresponding to the accno.</p>
440
- </div></span>
441
-
442
- </li>
443
-
444
-
445
- <li class="public ">
446
- <span class="summary_signature">
447
-
448
- <a href="#get_sequence_from_index_file-instance_method" title="#get_sequence_from_index_file (instance method)">- (Object) <strong>get_sequence_from_index_file</strong>(index_file_name, identifier) </a>
449
-
450
-
451
-
452
- </span>
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
- <span class="summary_desc"><div class='inline'>
463
- <p>Gets raw sequence by fasta identifier from a fasta index file Params:
464
- <tt>index_file_name</tt>: name of the fasta index file <tt>identifier</tt>:
465
- String Output: String with the nucleotide sequence corresponding to the
466
- identifier.</p>
467
- </div></span>
468
-
469
- </li>
470
-
471
-
472
- <li class="public ">
473
- <span class="summary_signature">
474
-
475
- <a href="#init_tabular_attribute-instance_method" title="#init_tabular_attribute (instance method)">- (Object) <strong>init_tabular_attribute</strong>(column, value) </a>
476
-
477
-
478
-
479
- </span>
480
-
481
-
482
-
483
-
484
-
485
-
486
-
487
-
488
-
489
- <span class="summary_desc"><div class='inline'>
490
- <p>Initializes the corresponding attribute of the sequence with respect to the
491
- column name of the tabular blast output.</p>
492
- </div></span>
493
-
494
- </li>
495
-
496
-
497
- <li class="public ">
498
- <span class="summary_signature">
499
-
500
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Sequence) <strong>initialize</strong> </a>
501
-
502
-
503
-
504
- </span>
505
-
506
-
507
- <span class="note title constructor">constructor</span>
508
-
509
-
510
-
511
-
512
-
513
-
514
-
515
-
516
- <span class="summary_desc"><div class='inline'>
517
- <p>A new instance of Sequence.</p>
518
- </div></span>
519
-
520
- </li>
521
-
522
-
523
- </ul>
524
-
525
-
526
- <div id="constructor_details" class="method_details_list">
527
- <h2>Constructor Details</h2>
528
-
529
- <div class="method_details first">
530
- <h3 class="signature first" id="initialize-instance_method">
531
-
532
- - (<tt><span class='object_link'><a href="" title="Sequence (class)">Sequence</a></span></tt>) <strong>initialize</strong>
533
-
534
-
535
-
536
-
537
-
538
- </h3><div class="docstring">
539
- <div class="discussion">
540
-
541
- <p>Returns a new instance of Sequence</p>
542
-
543
-
544
- </div>
545
- </div>
546
- <div class="tags">
547
-
548
-
549
- </div><table class="source_code">
550
- <tr>
551
- <td>
552
- <pre class="lines">
553
-
554
-
555
- 18
556
- 19
557
- 20
558
- 21
559
- 22
560
- 23</pre>
561
- </td>
562
- <td>
563
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 18</span>
564
-
565
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
566
- <span class='ivar'>@hsp_list</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
567
- <span class='ivar'>@raw_sequence</span> <span class='op'>=</span> <span class='kw'>nil</span>
568
- <span class='ivar'>@protein_translation</span> <span class='op'>=</span> <span class='kw'>nil</span>
569
- <span class='ivar'>@nucleotide_rf</span> <span class='op'>=</span> <span class='kw'>nil</span>
570
- <span class='kw'>end</span></pre>
571
- </td>
572
- </tr>
573
- </table>
574
- </div>
575
-
576
- </div>
577
-
578
- <div id="instance_attr_details" class="attr_details">
579
- <h2>Instance Attribute Details</h2>
580
-
581
-
582
- <span id="accession_no=-instance_method"></span>
583
- <div class="method_details first">
584
- <h3 class="signature first" id="accession_no-instance_method">
585
-
586
- - (<tt>Object</tt>) <strong>accession_no</strong>
587
-
588
-
589
-
590
-
591
-
592
- </h3><div class="docstring">
593
- <div class="discussion">
594
-
595
- <p>Returns the value of attribute accession_no</p>
596
-
597
-
598
- </div>
599
- </div>
600
- <div class="tags">
601
-
602
-
603
- </div><table class="source_code">
604
- <tr>
605
- <td>
606
- <pre class="lines">
607
-
608
-
609
- 9
610
- 10
611
- 11</pre>
612
- </td>
613
- <td>
614
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 9</span>
615
-
616
- <span class='kw'>def</span> <span class='id identifier rubyid_accession_no'>accession_no</span>
617
- <span class='ivar'>@accession_no</span>
618
- <span class='kw'>end</span></pre>
619
- </td>
620
- </tr>
621
- </table>
622
- </div>
623
-
624
-
625
- <span id="definition=-instance_method"></span>
626
- <div class="method_details ">
627
- <h3 class="signature " id="definition-instance_method">
628
-
629
- - (<tt>Object</tt>) <strong>definition</strong>
630
-
631
-
632
-
633
-
634
-
635
- </h3><div class="docstring">
636
- <div class="discussion">
637
-
638
- <p>Returns the value of attribute definition</p>
639
-
640
-
641
- </div>
642
- </div>
643
- <div class="tags">
644
-
645
-
646
- </div><table class="source_code">
647
- <tr>
648
- <td>
649
- <pre class="lines">
650
-
651
-
652
- 6
653
- 7
654
- 8</pre>
655
- </td>
656
- <td>
657
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 6</span>
658
-
659
- <span class='kw'>def</span> <span class='id identifier rubyid_definition'>definition</span>
660
- <span class='ivar'>@definition</span>
661
- <span class='kw'>end</span></pre>
662
- </td>
663
- </tr>
664
- </table>
665
- </div>
666
-
667
-
668
- <span id="hsp_list=-instance_method"></span>
669
- <div class="method_details ">
670
- <h3 class="signature " id="hsp_list-instance_method">
671
-
672
- - (<tt>Object</tt>) <strong>hsp_list</strong>
673
-
674
-
675
-
676
-
677
-
678
- </h3><div class="docstring">
679
- <div class="discussion">
680
-
681
- <p>array of Hsp objects</p>
682
-
683
-
684
- </div>
685
- </div>
686
- <div class="tags">
687
-
688
-
689
- </div><table class="source_code">
690
- <tr>
691
- <td>
692
- <pre class="lines">
693
-
694
-
695
- 12
696
- 13
697
- 14</pre>
698
- </td>
699
- <td>
700
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 12</span>
701
-
702
- <span class='kw'>def</span> <span class='id identifier rubyid_hsp_list'>hsp_list</span>
703
- <span class='ivar'>@hsp_list</span>
704
- <span class='kw'>end</span></pre>
705
- </td>
706
- </tr>
707
- </table>
708
- </div>
709
-
710
-
711
- <span id="identifier=-instance_method"></span>
712
- <div class="method_details ">
713
- <h3 class="signature " id="identifier-instance_method">
714
-
715
- - (<tt>Object</tt>) <strong>identifier</strong>
716
-
717
-
718
-
719
-
720
-
721
- </h3><div class="docstring">
722
- <div class="discussion">
723
-
724
- <p>Returns the value of attribute identifier</p>
725
-
726
-
727
- </div>
728
- </div>
729
- <div class="tags">
730
-
731
-
732
- </div><table class="source_code">
733
- <tr>
734
- <td>
735
- <pre class="lines">
736
-
737
-
738
- 7
739
- 8
740
- 9</pre>
741
- </td>
742
- <td>
743
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 7</span>
744
-
745
- <span class='kw'>def</span> <span class='id identifier rubyid_identifier'>identifier</span>
746
- <span class='ivar'>@identifier</span>
747
- <span class='kw'>end</span></pre>
748
- </td>
749
- </tr>
750
- </table>
751
- </div>
752
-
753
-
754
- <span id="length_protein=-instance_method"></span>
755
- <div class="method_details ">
756
- <h3 class="signature " id="length_protein-instance_method">
757
-
758
- - (<tt>Object</tt>) <strong>length_protein</strong>
759
-
760
-
761
-
762
-
763
-
764
- </h3><div class="docstring">
765
- <div class="discussion">
766
-
767
- <p>Returns the value of attribute length_protein</p>
768
-
769
-
770
- </div>
771
- </div>
772
- <div class="tags">
773
-
774
-
775
- </div><table class="source_code">
776
- <tr>
777
- <td>
778
- <pre class="lines">
779
-
780
-
781
- 10
782
- 11
783
- 12</pre>
784
- </td>
785
- <td>
786
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 10</span>
787
-
788
- <span class='kw'>def</span> <span class='id identifier rubyid_length_protein'>length_protein</span>
789
- <span class='ivar'>@length_protein</span>
790
- <span class='kw'>end</span></pre>
791
- </td>
792
- </tr>
793
- </table>
794
- </div>
795
-
796
-
797
- <span id="nucleotide_rf=-instance_method"></span>
798
- <div class="method_details ">
799
- <h3 class="signature " id="nucleotide_rf-instance_method">
800
-
801
- - (<tt>Object</tt>) <strong>nucleotide_rf</strong>
802
-
803
-
804
-
805
-
806
-
807
- </h3><div class="docstring">
808
- <div class="discussion">
809
-
810
- <p>used only for nucleotides</p>
811
-
812
-
813
- </div>
814
- </div>
815
- <div class="tags">
816
-
817
-
818
- </div><table class="source_code">
819
- <tr>
820
- <td>
821
- <pre class="lines">
822
-
823
-
824
- 16
825
- 17
826
- 18</pre>
827
- </td>
828
- <td>
829
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 16</span>
830
-
831
- <span class='kw'>def</span> <span class='id identifier rubyid_nucleotide_rf'>nucleotide_rf</span>
832
- <span class='ivar'>@nucleotide_rf</span>
833
- <span class='kw'>end</span></pre>
834
- </td>
835
- </tr>
836
- </table>
837
- </div>
838
-
839
-
840
- <span id="protein_translation=-instance_method"></span>
841
- <div class="method_details ">
842
- <h3 class="signature " id="protein_translation-instance_method">
843
-
844
- - (<tt>Object</tt>) <strong>protein_translation</strong>
845
-
846
-
847
-
848
-
849
-
850
- </h3><div class="docstring">
851
- <div class="discussion">
852
-
853
- <p>used only for nucleotides</p>
854
-
855
-
856
- </div>
857
- </div>
858
- <div class="tags">
859
-
860
-
861
- </div><table class="source_code">
862
- <tr>
863
- <td>
864
- <pre class="lines">
865
-
866
-
867
- 15
868
- 16
869
- 17</pre>
870
- </td>
871
- <td>
872
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 15</span>
873
-
874
- <span class='kw'>def</span> <span class='id identifier rubyid_protein_translation'>protein_translation</span>
875
- <span class='ivar'>@protein_translation</span>
876
- <span class='kw'>end</span></pre>
877
- </td>
878
- </tr>
879
- </table>
880
- </div>
881
-
882
-
883
- <span id="raw_sequence=-instance_method"></span>
884
- <div class="method_details ">
885
- <h3 class="signature " id="raw_sequence-instance_method">
886
-
887
- - (<tt>Object</tt>) <strong>raw_sequence</strong>
888
-
889
-
890
-
891
-
892
-
893
- </h3><div class="docstring">
894
- <div class="discussion">
895
-
896
- <p>Returns the value of attribute raw_sequence</p>
897
-
898
-
899
- </div>
900
- </div>
901
- <div class="tags">
902
-
903
-
904
- </div><table class="source_code">
905
- <tr>
906
- <td>
907
- <pre class="lines">
908
-
909
-
910
- 14
911
- 15
912
- 16</pre>
913
- </td>
914
- <td>
915
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 14</span>
916
-
917
- <span class='kw'>def</span> <span class='id identifier rubyid_raw_sequence'>raw_sequence</span>
918
- <span class='ivar'>@raw_sequence</span>
919
- <span class='kw'>end</span></pre>
920
- </td>
921
- </tr>
922
- </table>
923
- </div>
924
-
925
-
926
- <span id="reading_frame=-instance_method"></span>
927
- <div class="method_details ">
928
- <h3 class="signature " id="reading_frame-instance_method">
929
-
930
- - (<tt>Object</tt>) <strong>reading_frame</strong>
931
-
932
-
933
-
934
-
935
-
936
- </h3><div class="docstring">
937
- <div class="discussion">
938
-
939
- <p>Returns the value of attribute reading_frame</p>
940
-
941
-
942
- </div>
943
- </div>
944
- <div class="tags">
945
-
946
-
947
- </div><table class="source_code">
948
- <tr>
949
- <td>
950
- <pre class="lines">
951
-
952
-
953
- 11
954
- 12
955
- 13</pre>
956
- </td>
957
- <td>
958
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 11</span>
959
-
960
- <span class='kw'>def</span> <span class='id identifier rubyid_reading_frame'>reading_frame</span>
961
- <span class='ivar'>@reading_frame</span>
962
- <span class='kw'>end</span></pre>
963
- </td>
964
- </tr>
965
- </table>
966
- </div>
967
-
968
-
969
- <span id="species=-instance_method"></span>
970
- <div class="method_details ">
971
- <h3 class="signature " id="species-instance_method">
972
-
973
- - (<tt>Object</tt>) <strong>species</strong>
974
-
975
-
976
-
977
-
978
-
979
- </h3><div class="docstring">
980
- <div class="discussion">
981
-
982
- <p>Returns the value of attribute species</p>
983
-
984
-
985
- </div>
986
- </div>
987
- <div class="tags">
988
-
989
-
990
- </div><table class="source_code">
991
- <tr>
992
- <td>
993
- <pre class="lines">
994
-
995
-
996
- 8
997
- 9
998
- 10</pre>
999
- </td>
1000
- <td>
1001
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 8</span>
1002
-
1003
- <span class='kw'>def</span> <span class='id identifier rubyid_species'>species</span>
1004
- <span class='ivar'>@species</span>
1005
- <span class='kw'>end</span></pre>
1006
- </td>
1007
- </tr>
1008
- </table>
1009
- </div>
1010
-
1011
-
1012
- <span id="type=-instance_method"></span>
1013
- <div class="method_details ">
1014
- <h3 class="signature " id="type-instance_method">
1015
-
1016
- - (<tt>Object</tt>) <strong>type</strong>
1017
-
1018
-
1019
-
1020
-
1021
-
1022
- </h3><div class="docstring">
1023
- <div class="discussion">
1024
-
1025
- <p>protein | mRNA</p>
1026
-
1027
-
1028
- </div>
1029
- </div>
1030
- <div class="tags">
1031
-
1032
-
1033
- </div><table class="source_code">
1034
- <tr>
1035
- <td>
1036
- <pre class="lines">
1037
-
1038
-
1039
- 5
1040
- 6
1041
- 7</pre>
1042
- </td>
1043
- <td>
1044
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 5</span>
1045
-
1046
- <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
1047
- <span class='ivar'>@type</span>
1048
- <span class='kw'>end</span></pre>
1049
- </td>
1050
- </tr>
1051
- </table>
1052
- </div>
1053
-
1054
- </div>
1055
-
1056
-
1057
- <div id="instance_method_details" class="method_details_list">
1058
- <h2>Instance Method Details</h2>
1059
-
1060
-
1061
- <div class="method_details first">
1062
- <h3 class="signature first" id="get_sequence_by_accession_no-instance_method">
1063
-
1064
- - (<tt>Object</tt>) <strong>get_sequence_by_accession_no</strong>(accno, db)
1065
-
1066
-
1067
-
1068
-
1069
-
1070
- </h3><div class="docstring">
1071
- <div class="discussion">
1072
-
1073
- <p>Gets raw sequence by accession number from a givem database Params:
1074
- <tt>accno</tt>: accession number as String <tt>db</tt>: database as String
1075
- Output: String with the nucleotide sequence corresponding to the accno</p>
1076
-
1077
-
1078
- </div>
1079
- </div>
1080
- <div class="tags">
1081
-
1082
-
1083
- </div><table class="source_code">
1084
- <tr>
1085
- <td>
1086
- <pre class="lines">
1087
-
1088
-
1089
- 67
1090
- 68
1091
- 69
1092
- 70
1093
- 71
1094
- 72
1095
- 73
1096
- 74
1097
- 75
1098
- 76
1099
- 77
1100
- 78
1101
- 79
1102
- 80
1103
- 81
1104
- 82
1105
- 83
1106
- 84
1107
- 85
1108
- 86
1109
- 87
1110
- 88
1111
- 89
1112
- 90
1113
- 91</pre>
1114
- </td>
1115
- <td>
1116
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 67</span>
1117
-
1118
- <span class='kw'>def</span> <span class='id identifier rubyid_get_sequence_by_accession_no'>get_sequence_by_accession_no</span><span class='lparen'>(</span><span class='id identifier rubyid_accno'>accno</span><span class='comma'>,</span> <span class='id identifier rubyid_db'>db</span><span class='rparen'>)</span>
1119
-
1120
- <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_db'>db</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='op'>&lt;&lt;</span>
1121
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&amp;retmax=1&amp;usehistory=y&amp;term=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_accno'>accno</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='tstring_end'>&quot;</span></span>
1122
- <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span><span class='rparen'>)</span>
1123
-
1124
- <span class='id identifier rubyid_result2'>result2</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span>
1125
- <span class='id identifier rubyid_queryKey'>queryKey</span> <span class='op'>=</span> <span class='id identifier rubyid_result2'>result2</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>&lt;\bQueryKey\b&gt;([\w\W\d]+)&lt;\/\bQueryKey\b&gt;</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
1126
- <span class='id identifier rubyid_webEnv'>webEnv</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>&lt;\bWebEnv\b&gt;([\w\W\d]+)&lt;\/\bWebEnv\b&gt;</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
1127
-
1128
- <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;</span><span class='tstring_end'>&quot;</span></span><span class='op'>&lt;&lt;</span>
1129
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>retmode=text&amp;retstart=0&amp;retmax=1&amp;db=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_db'>db</span><span class='rbrace'>}</span><span class='tstring_content'>&amp;query_key=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_queryKey'>queryKey</span><span class='rbrace'>}</span><span class='tstring_content'>&amp;WebEnv=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_webEnv'>webEnv</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1130
- <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span><span class='rparen'>)</span>
1131
-
1132
- <span class='comment'>#parse FASTA output
1133
- </span> <span class='id identifier rubyid_rec'>rec</span><span class='op'>=</span><span class='id identifier rubyid_result'>result</span>
1134
- <span class='id identifier rubyid_nl'>nl</span> <span class='op'>=</span> <span class='id identifier rubyid_rec'>rec</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1135
- <span class='id identifier rubyid_header'>header</span> <span class='op'>=</span> <span class='id identifier rubyid_rec'>rec</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='id identifier rubyid_nl'>nl</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
1136
- <span class='id identifier rubyid_seq'>seq</span> <span class='op'>=</span> <span class='id identifier rubyid_rec'>rec</span><span class='lbracket'>[</span><span class='id identifier rubyid_nl'>nl</span><span class='op'>+</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
1137
- <span class='ivar'>@raw_sequence</span> <span class='op'>=</span> <span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\n</span><span class='regexp_end'>/</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1138
- <span class='kw'>unless</span> <span class='ivar'>@raw_sequence</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>ERROR</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='kw'>nil</span>
1139
- <span class='ivar'>@raw_sequence</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
1140
- <span class='kw'>end</span>
1141
- <span class='ivar'>@raw_sequence</span>
1142
- <span class='kw'>end</span></pre>
1143
- </td>
1144
- </tr>
1145
- </table>
1146
- </div>
1147
-
1148
- <div class="method_details ">
1149
- <h3 class="signature " id="get_sequence_from_index_file-instance_method">
1150
-
1151
- - (<tt>Object</tt>) <strong>get_sequence_from_index_file</strong>(index_file_name, identifier)
1152
-
1153
-
1154
-
1155
-
1156
-
1157
- </h3><div class="docstring">
1158
- <div class="discussion">
1159
-
1160
- <p>Gets raw sequence by fasta identifier from a fasta index file Params:
1161
- <tt>index_file_name</tt>: name of the fasta index file <tt>identifier</tt>:
1162
- String Output: String with the nucleotide sequence corresponding to the
1163
- identifier</p>
1164
-
1165
-
1166
- </div>
1167
- </div>
1168
- <div class="tags">
1169
-
1170
-
1171
- </div><table class="source_code">
1172
- <tr>
1173
- <td>
1174
- <pre class="lines">
1175
-
1176
-
1177
- 40
1178
- 41
1179
- 42
1180
- 43
1181
- 44
1182
- 45
1183
- 46
1184
- 47
1185
- 48
1186
- 49
1187
- 50
1188
- 51
1189
- 52
1190
- 53
1191
- 54
1192
- 55
1193
- 56
1194
- 57
1195
- 58</pre>
1196
- </td>
1197
- <td>
1198
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 40</span>
1199
-
1200
- <span class='kw'>def</span> <span class='id identifier rubyid_get_sequence_from_index_file'>get_sequence_from_index_file</span><span class='lparen'>(</span><span class='id identifier rubyid_index_file_name'>index_file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_identifier'>identifier</span><span class='rparen'>)</span>
1201
- <span class='kw'>begin</span>
1202
- <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='const'>Bio</span><span class='op'>::</span><span class='const'>FlatFileIndex</span><span class='op'>::</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_index_file_name'>index_file_name</span><span class='rparen'>)</span>
1203
-
1204
- <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_identifier'>identifier</span>
1205
-
1206
- <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='id identifier rubyid_identifier'>identifier</span><span class='rparen'>)</span>
1207
- <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Results: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1208
- <span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_str'>str</span><span class='op'>|</span>
1209
- <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_str'>str</span>
1210
- <span class='kw'>end</span>
1211
- <span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
1212
-
1213
- <span class='comment'>#fasta_sequence = index.get_by_id(identifier) # returned as fasta string
1214
- </span> <span class='comment'>#return fasta_sequence
1215
- </span> <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_error'>error</span>
1216
- <span class='gvar'>$stderr</span><span class='period'>.</span><span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Error at </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\/([^\/]+:\d+):.*</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span>
1217
- <span class='kw'>end</span>
1218
- <span class='kw'>end</span></pre>
1219
- </td>
1220
- </tr>
1221
- </table>
1222
- </div>
1223
-
1224
- <div class="method_details ">
1225
- <h3 class="signature " id="init_tabular_attribute-instance_method">
1226
-
1227
- - (<tt>Object</tt>) <strong>init_tabular_attribute</strong>(column, value)
1228
-
1229
-
1230
-
1231
-
1232
-
1233
- </h3><div class="docstring">
1234
- <div class="discussion">
1235
-
1236
- <p>Initializes the corresponding attribute of the sequence with respect to the
1237
- column name of the tabular blast output</p>
1238
-
1239
-
1240
- </div>
1241
- </div>
1242
- <div class="tags">
1243
-
1244
-
1245
- </div><table class="source_code">
1246
- <tr>
1247
- <td>
1248
- <pre class="lines">
1249
-
1250
-
1251
- 96
1252
- 97
1253
- 98
1254
- 99
1255
- 100
1256
- 101
1257
- 102
1258
- 103
1259
- 104
1260
- 105
1261
- 106
1262
- 107
1263
- 108
1264
- 109</pre>
1265
- </td>
1266
- <td>
1267
- <pre class="code"><span class="info file"># File 'lib/genevalidator/sequences.rb', line 96</span>
1268
-
1269
- <span class='kw'>def</span> <span class='id identifier rubyid_init_tabular_attribute'>init_tabular_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_column'>column</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1270
- <span class='kw'>case</span> <span class='id identifier rubyid_column'>column</span>
1271
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sseqid</span><span class='tstring_end'>&quot;</span></span>
1272
- <span class='comment'>#@definition = value
1273
- </span> <span class='ivar'>@identifier</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
1274
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>qseqid</span><span class='tstring_end'>&quot;</span></span>
1275
- <span class='comment'>#@definition = value
1276
- </span> <span class='ivar'>@identifier</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
1277
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sacc</span><span class='tstring_end'>&quot;</span></span>
1278
- <span class='ivar'>@accession_no</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
1279
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>slen</span><span class='tstring_end'>&quot;</span></span>
1280
- <span class='ivar'>@length_protein</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
1281
- <span class='kw'>end</span>
1282
- <span class='kw'>end</span></pre>
1283
- </td>
1284
- </tr>
1285
- </table>
1286
- </div>
1287
-
1288
- </div>
1289
-
1290
- </div>
1291
-
1292
- <div id="footer">
1293
- Generated on Sat Sep 28 07:01:32 2013 by
1294
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1295
- 0.8.7.2 (ruby-1.9.3).
1296
- </div>
1297
-
1298
- </body>
1299
- </html>