workflow-to-galaxy 0.2.9 → 0.3.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,338 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: WorkflowToGalaxy::GalaxyTool</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="../index.html">Home</a>
25
+ <a href="../index.html#classes">Classes</a>
26
+ <a href="../index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="../lib/workflow-to-galaxy/galaxy_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/workflow-to-galaxy/galaxy.rb">lib/workflow-to-galaxy/galaxy.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+ <!-- Parent Class -->
50
+ <div id="parent-class-section" class="section">
51
+ <h3 class="section-header">Parent</h3>
52
+
53
+ <p class="link">Object</p>
54
+
55
+ </div>
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+ <!-- Method Quickref -->
64
+ <div id="method-list-section" class="section">
65
+ <h3 class="section-header">Methods</h3>
66
+ <ul class="link-list">
67
+
68
+ <li><a href="#method-c-new">::new</a></li>
69
+
70
+ <li><a href="#method-i-generate">#generate</a></li>
71
+
72
+ </ul>
73
+ </div>
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="project-metadata">
80
+
81
+
82
+ <div id="fileindex-section" class="section project-section">
83
+ <h3 class="section-header">Files</h3>
84
+ <ul>
85
+
86
+ <li class="file"><a href="../CHANGES.html">CHANGES</a></li>
87
+
88
+ <li class="file"><a href="../LICENSE.html">LICENSE</a></li>
89
+
90
+ <li class="file"><a href="../README.html">README</a></li>
91
+
92
+ </ul>
93
+ </div>
94
+
95
+
96
+ <div id="classindex-section" class="section project-section">
97
+ <h3 class="section-header">Class/Module Index
98
+ <span class="search-toggle"><img src="../images/find.png"
99
+ height="16" width="16" alt="[+]"
100
+ title="show/hide quicksearch" /></span></h3>
101
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
102
+ <fieldset>
103
+ <legend>Quicksearch</legend>
104
+ <input type="text" name="quicksearch" value=""
105
+ class="quicksearch-field" />
106
+ </fieldset>
107
+ </form>
108
+
109
+ <ul class="link-list">
110
+
111
+ <li><a href="../WorkflowToGalaxy.html">WorkflowToGalaxy</a></li>
112
+
113
+ <li><a href="../WorkflowToGalaxy/GalaxyTool.html">WorkflowToGalaxy::GalaxyTool</a></li>
114
+
115
+ <li><a href="../WorkflowToGalaxy/Workflows.html">WorkflowToGalaxy::Workflows</a></li>
116
+
117
+ </ul>
118
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
119
+ </div>
120
+
121
+
122
+ </div>
123
+ </div>
124
+
125
+ <div id="documentation">
126
+ <h1 class="class">WorkflowToGalaxy::GalaxyTool</h1>
127
+
128
+ <div id="description" class="description">
129
+
130
+ <p>The <em><a href="GalaxyTool.html">GalaxyTool</a></em> class contains a
131
+ <tt>generate</tt> public method that generates the required files (XML and
132
+ script) for a Galaxy tool.</p>
133
+
134
+ </div><!-- description -->
135
+
136
+
137
+ <div id="5Buntitled-5D" class="documentation-section">
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <!-- Attributes -->
146
+ <div id="attribute-method-details" class="method-section section">
147
+ <h3 class="section-header">Attributes</h3>
148
+
149
+
150
+ <div id="config-attribute-method" class="method-detail">
151
+ <a name="config"></a>
152
+
153
+ <a name="config="></a>
154
+
155
+ <div class="method-heading attribute-method-heading">
156
+ <span class="method-name">config</span><span
157
+ class="attribute-access-type">[RW]</span>
158
+ </div>
159
+
160
+ <div class="method-description">
161
+
162
+ <p><tt>config</tt> contains data needed in relation to what the tool will do
163
+ and <tt><a
164
+ href="GalaxyTool.html#attribute-i-wkf_object">wkf_object</a></tt> contains
165
+ the workflow object that will be used to generate the galaxy tool</p>
166
+
167
+ </div>
168
+ </div>
169
+
170
+ <div id="wkf_object-attribute-method" class="method-detail">
171
+ <a name="wkf_object"></a>
172
+
173
+ <a name="wkf_object="></a>
174
+
175
+ <div class="method-heading attribute-method-heading">
176
+ <span class="method-name">wkf_object</span><span
177
+ class="attribute-access-type">[RW]</span>
178
+ </div>
179
+
180
+ <div class="method-description">
181
+
182
+ <p><tt>config</tt> contains data needed in relation to what the tool will do
183
+ and <tt><a
184
+ href="GalaxyTool.html#attribute-i-wkf_object">wkf_object</a></tt> contains
185
+ the workflow object that will be used to generate the galaxy tool</p>
186
+
187
+ </div>
188
+ </div>
189
+
190
+ </div><!-- attribute-method-details -->
191
+
192
+
193
+ <!-- Methods -->
194
+
195
+ <div id="public-class-method-details" class="method-section section">
196
+ <h3 class="section-header">Public Class Methods</h3>
197
+
198
+
199
+ <div id="new-method" class="method-detail ">
200
+ <a name="method-c-new"></a>
201
+
202
+
203
+ <div class="method-heading">
204
+ <span class="method-name">new</span><span
205
+ class="method-args">(config)</span>
206
+ <span class="method-click-advice">click to toggle source</span>
207
+ </div>
208
+
209
+
210
+ <div class="method-description">
211
+
212
+ <p>-</p>
213
+
214
+ <pre>TODO: does initialize appear in rdoc? -- these will go to README as well...</pre>
215
+
216
+
217
+
218
+ <div class="method-source-code" id="new-source">
219
+ <pre>
220
+ <span class="ruby-comment"># File lib/workflow-to-galaxy/galaxy.rb, line 39</span>
221
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">config</span>)
222
+ <span class="ruby-ivar">@config</span> = <span class="ruby-identifier">config</span>
223
+ <span class="ruby-keyword">end</span></pre>
224
+ </div><!-- new-source -->
225
+
226
+ </div>
227
+
228
+
229
+
230
+
231
+ </div><!-- new-method -->
232
+
233
+
234
+ </div><!-- public-class-method-details -->
235
+
236
+ <div id="public-instance-method-details" class="method-section section">
237
+ <h3 class="section-header">Public Instance Methods</h3>
238
+
239
+
240
+ <div id="generate-method" class="method-detail ">
241
+ <a name="method-i-generate"></a>
242
+
243
+
244
+
245
+ <div class="method-heading">
246
+ <span class="method-callseq">generate() &rarr; nil</span>
247
+
248
+ <span class="method-click-advice">click to toggle source</span>
249
+
250
+ </div>
251
+
252
+
253
+
254
+ <div class="method-description">
255
+
256
+ <p>Generates the two files needed for a Galaxy tool: a configuration file
257
+ (XML) and a processing file (in our case a ruby script)</p>
258
+
259
+
260
+
261
+ <div class="method-source-code" id="generate-source">
262
+ <pre>
263
+ <span class="ruby-comment"># File lib/workflow-to-galaxy/galaxy.rb, line 575</span>
264
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">generate</span>
265
+
266
+ <span class="ruby-comment"># check the type of workflow source and acquire the appropriate data</span>
267
+ <span class="ruby-keyword">if</span>(<span class="ruby-identifier">config</span>[<span class="ruby-value">:wkf_source</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">Workflows</span><span class="ruby-operator">::</span><span class="ruby-constant">MYEXPERIMENT_TAVERNA2</span>)
268
+
269
+ <span class="ruby-comment"># TODO: check and add auth stuff -- even more unsafe with session cookies</span>
270
+ <span class="ruby-comment"># since the myexp username/passwd will be saved in the galaxy ruby script</span>
271
+ <span class="ruby-comment"># for all to see...</span>
272
+
273
+ <span class="ruby-keyword">begin</span>
274
+ <span class="ruby-comment"># Get workflow data from myexperiment -- a _MyExperimentWorkflow_ object is returned</span>
275
+ <span class="ruby-ivar">@wkf_object</span> = <span class="ruby-constant">MyExperimentREST</span><span class="ruby-operator">::</span><span class="ruby-constant">Workflow</span>.<span class="ruby-identifier">from_uri</span>(<span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:url</span>])
276
+ <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
277
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&quot;Problem acquiring workflow data from myExperiment!\n&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>
278
+ <span class="ruby-keyword">end</span>
279
+
280
+ <span class="ruby-keyword">elsif</span>(<span class="ruby-identifier">config</span>[<span class="ruby-value">:wkf_source</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">Workflows</span><span class="ruby-operator">::</span><span class="ruby-constant">T2FLOW</span>)
281
+
282
+ <span class="ruby-keyword">begin</span>
283
+ <span class="ruby-comment"># Get workflow data from t2flow file -- a _MyExperimentWorkflow_ object is returned</span>
284
+ <span class="ruby-ivar">@wkf_object</span> = <span class="ruby-identifier">populate_taverna_workflow_from_t2flow</span>(<span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:t2flow</span>])
285
+ <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
286
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&quot;Problem acquiring workflow data from t2flow file!\n&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>
287
+ <span class="ruby-keyword">end</span>
288
+
289
+ <span class="ruby-keyword">else</span>
290
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&quot;No such workflow source supported!&quot;</span>
291
+ <span class="ruby-keyword">end</span>
292
+
293
+ <span class="ruby-comment"># if an xml_out file handler was not given provide one with the title as the value</span>
294
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:xml_out</span>]
295
+ <span class="ruby-identifier">generate_xml</span>(<span class="ruby-ivar">@wkf_object</span>, <span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:xml_out</span>])
296
+ <span class="ruby-keyword">else</span>
297
+ <span class="ruby-identifier">xml_out</span> = <span class="ruby-identifier">open</span>(<span class="ruby-ivar">@wkf_object</span>.<span class="ruby-identifier">title</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;.xml&quot;</span>, <span class="ruby-string">&quot;w&quot;</span>)
298
+ <span class="ruby-identifier">generate_xml</span>(<span class="ruby-ivar">@wkf_object</span>, <span class="ruby-identifier">xml_out</span>)
299
+ <span class="ruby-identifier">xml_out</span>.<span class="ruby-identifier">close</span>
300
+ <span class="ruby-keyword">end</span>
301
+
302
+ <span class="ruby-comment"># if an rb_out file handler was not given provide one with the title as the value</span>
303
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:rb_out</span>]
304
+ <span class="ruby-identifier">generate_rb</span>(<span class="ruby-ivar">@wkf_object</span>, <span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:rb_out</span>], <span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:t2_server</span>])
305
+ <span class="ruby-keyword">else</span>
306
+ <span class="ruby-identifier">rb_out</span> = <span class="ruby-identifier">open</span>(<span class="ruby-ivar">@wkf_object</span>.<span class="ruby-identifier">title</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;.rb&quot;</span>, <span class="ruby-string">&quot;w&quot;</span>)
307
+ <span class="ruby-identifier">generate_rb</span>(<span class="ruby-ivar">@wkf_object</span>, <span class="ruby-identifier">rb_out</span>, <span class="ruby-ivar">@config</span>[<span class="ruby-value">:params</span>][<span class="ruby-value">:t2_server</span>])
308
+ <span class="ruby-identifier">rb_out</span>.<span class="ruby-identifier">close</span>
309
+ <span class="ruby-keyword">end</span>
310
+
311
+
312
+ <span class="ruby-keyword">end</span></pre>
313
+ </div><!-- generate-source -->
314
+
315
+ </div>
316
+
317
+
318
+
319
+
320
+ </div><!-- generate-method -->
321
+
322
+
323
+ </div><!-- public-instance-method-details -->
324
+
325
+ </div><!-- 5Buntitled-5D -->
326
+
327
+
328
+ </div><!-- documentation -->
329
+
330
+ <div id="validator-badges">
331
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
332
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
333
+ Rdoc Generator</a> 2</small>.</p>
334
+ </div>
335
+
336
+ </body>
337
+ </html>
338
+
@@ -0,0 +1,155 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: WorkflowToGalaxy::Workflows</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="module">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="../index.html">Home</a>
25
+ <a href="../index.html#classes">Classes</a>
26
+ <a href="../index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="../lib/workflow-to-galaxy/constants_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/workflow-to-galaxy/constants.rb">lib/workflow-to-galaxy/constants.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+ </div>
58
+
59
+ <div id="project-metadata">
60
+
61
+
62
+ <div id="fileindex-section" class="section project-section">
63
+ <h3 class="section-header">Files</h3>
64
+ <ul>
65
+
66
+ <li class="file"><a href="../CHANGES.html">CHANGES</a></li>
67
+
68
+ <li class="file"><a href="../LICENSE.html">LICENSE</a></li>
69
+
70
+ <li class="file"><a href="../README.html">README</a></li>
71
+
72
+ </ul>
73
+ </div>
74
+
75
+
76
+ <div id="classindex-section" class="section project-section">
77
+ <h3 class="section-header">Class/Module Index
78
+ <span class="search-toggle"><img src="../images/find.png"
79
+ height="16" width="16" alt="[+]"
80
+ title="show/hide quicksearch" /></span></h3>
81
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
82
+ <fieldset>
83
+ <legend>Quicksearch</legend>
84
+ <input type="text" name="quicksearch" value=""
85
+ class="quicksearch-field" />
86
+ </fieldset>
87
+ </form>
88
+
89
+ <ul class="link-list">
90
+
91
+ <li><a href="../WorkflowToGalaxy.html">WorkflowToGalaxy</a></li>
92
+
93
+ <li><a href="../WorkflowToGalaxy/GalaxyTool.html">WorkflowToGalaxy::GalaxyTool</a></li>
94
+
95
+ <li><a href="../WorkflowToGalaxy/Workflows.html">WorkflowToGalaxy::Workflows</a></li>
96
+
97
+ </ul>
98
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
99
+ </div>
100
+
101
+
102
+ </div>
103
+ </div>
104
+
105
+ <div id="documentation">
106
+ <h1 class="module">WorkflowToGalaxy::Workflows</h1>
107
+
108
+ <div id="description" class="description">
109
+
110
+ </div><!-- description -->
111
+
112
+
113
+ <div id="5Buntitled-5D" class="documentation-section">
114
+
115
+
116
+
117
+
118
+
119
+ <!-- Constants -->
120
+ <div id="constants-list" class="section">
121
+ <h3 class="section-header">Constants</h3>
122
+ <dl>
123
+
124
+ <dt><a name="MYEXPERIMENT_TAVERNA2">MYEXPERIMENT_TAVERNA2</a></dt>
125
+
126
+ <dd class="description"></dd>
127
+
128
+
129
+ <dt><a name="T2FLOW">T2FLOW</a></dt>
130
+
131
+ <dd class="description"></dd>
132
+
133
+
134
+ </dl>
135
+ </div>
136
+
137
+
138
+
139
+
140
+ <!-- Methods -->
141
+
142
+ </div><!-- 5Buntitled-5D -->
143
+
144
+
145
+ </div><!-- documentation -->
146
+
147
+ <div id="validator-badges">
148
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
149
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
150
+ Rdoc Generator</a> 2</small>.</p>
151
+ </div>
152
+
153
+ </body>
154
+ </html>
155
+