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.
- data/CHANGES +5 -0
- data/README +1 -1
- data/Rakefile +5 -10
- data/bin/workflow_to_galaxy.rb +58 -65
- data/doc/rdoc/CHANGES.html +10 -3
- data/doc/rdoc/Generator.html +49 -46
- data/doc/rdoc/LICENSE.html +3 -3
- data/doc/rdoc/README.html +4 -4
- data/doc/rdoc/WorkflowToGalaxy.html +33 -3
- data/doc/rdoc/WorkflowToGalaxy/GalaxyTool.html +338 -0
- data/doc/rdoc/WorkflowToGalaxy/Workflows.html +155 -0
- data/doc/rdoc/created.rid +6 -7
- data/doc/rdoc/index.html +6 -6
- data/doc/rdoc/lib/workflow-to-galaxy/constants_rb.html +52 -0
- data/doc/rdoc/lib/workflow-to-galaxy/generator_rb.html +7 -4
- data/doc/rdoc/lib/workflow-to-galaxy_rb.html +4 -2
- data/lib/workflow-to-galaxy.rb +4 -2
- data/lib/workflow-to-galaxy/constants.rb +8 -0
- data/lib/workflow-to-galaxy/galaxy.rb +628 -0
- metadata +22 -20
- data/lib/generator.rb +0 -265
- data/lib/workflow-to-galaxy/generator.rb +0 -511
- data/lib/workflow_to_galaxy.rb +0 -65
data/lib/workflow_to_galaxy.rb
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'optparse'
|
5
|
-
require 'myexperiment-rest'
|
6
|
-
require 'generator'
|
7
|
-
|
8
|
-
include MyExperimentREST
|
9
|
-
include Generator
|
10
|
-
|
11
|
-
|
12
|
-
# Set up and parse arguments
|
13
|
-
out_file = ""
|
14
|
-
t2_server = ""
|
15
|
-
opts = OptionParser.new do |opt|
|
16
|
-
opt.banner = "Usage: workflow_to_galaxy [options] <myExperiement-workflow>"
|
17
|
-
opt.separator ""
|
18
|
-
opt.separator "Generates a Galaxy tool (a UI xml definition plus a script) for the "
|
19
|
-
opt.separator "specified Taverna2 workflow, where <myExperiment-workflow> is "
|
20
|
-
opt.separator "the full URL of the workflow in the myExperiment website. Available "
|
21
|
-
opt.separator "options are:"
|
22
|
-
|
23
|
-
opt.on("-o OUTPUT", "--output=OUTPUT", "The file name(s) of the generated tool. " +
|
24
|
-
"If it is not specified then the workflow's name will be used.") do |val|
|
25
|
-
out_file = val if val != nil
|
26
|
-
end
|
27
|
-
|
28
|
-
opt.on("-s SERVER", "--server=SERVER", "The taverna server that the script will request execution from. " +
|
29
|
-
"If it is not specified then 'http://localhost:8980/taverna-server' will be used.") do |val|
|
30
|
-
t2_server = val if val != nil
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
opts.parse!
|
35
|
-
|
36
|
-
# Read and check workflow URL
|
37
|
-
url = ARGV.shift
|
38
|
-
if url == nil
|
39
|
-
puts opts
|
40
|
-
exit 1
|
41
|
-
end
|
42
|
-
|
43
|
-
# Get workflow data from myexperiment
|
44
|
-
me_rest = ReadWorkflow.new(url)
|
45
|
-
|
46
|
-
# Set output files
|
47
|
-
if out_file != ""
|
48
|
-
xml_file = "#{out_file}.xml"
|
49
|
-
script_file = "#{out_file}.rb"
|
50
|
-
else
|
51
|
-
xml_file = "#{me_rest.workflow.title}".gsub(/\W/, '') + ".xml"
|
52
|
-
script_file = "#{me_rest.workflow.title}".gsub(/\W/, '') + ".rb"
|
53
|
-
end
|
54
|
-
|
55
|
-
# Set taverna server
|
56
|
-
if t2_server == ""
|
57
|
-
t2_server = "http://localhost:8980/taverna-server"
|
58
|
-
end
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
generate_xml(me_rest, xml_file)
|
63
|
-
generate_script(me_rest, t2_server, script_file)
|
64
|
-
|
65
|
-
|