bio-grid 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bio-grid.gemspec +1 -1
- data/lib/bio/grid.rb +3 -1
- data/lib/bio/grid/job.rb +2 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
data/bio-grid.gemspec
CHANGED
data/lib/bio/grid.rb
CHANGED
@@ -2,15 +2,17 @@ module Bio
|
|
2
2
|
|
3
3
|
class Grid
|
4
4
|
|
5
|
-
attr_accessor :input,:number
|
5
|
+
attr_accessor :input,:number,:uuid
|
6
6
|
def initialize(input,number)
|
7
7
|
@input = input
|
8
8
|
@number = number
|
9
|
+
@uuid = UUID.new.generate.split("-").first
|
9
10
|
end
|
10
11
|
|
11
12
|
def self.run(options)
|
12
13
|
options[:number] = 1 unless options[:number]
|
13
14
|
grid = self.new options[:input], options[:number]
|
15
|
+
options[:uuid] = grid.uuid
|
14
16
|
groups = grid.prepare_input_groups
|
15
17
|
inputs = groups.keys.sort
|
16
18
|
groups[inputs.shift].each_with_index do |input1,index|
|
data/lib/bio/grid/job.rb
CHANGED
@@ -6,7 +6,6 @@ module Bio
|
|
6
6
|
def initialize(options)
|
7
7
|
@options = options
|
8
8
|
self.instructions = []
|
9
|
-
self.uuid = UUID.new.generate.split("-").first
|
10
9
|
end
|
11
10
|
|
12
11
|
def set_output_dir
|
@@ -22,12 +21,12 @@ module Bio
|
|
22
21
|
job_output = ""
|
23
22
|
if commandline =~/<output>\.(\S+)/
|
24
23
|
extension = $1
|
25
|
-
job_output = self.options[:output]+"/#{
|
24
|
+
job_output = self.options[:output]+"/#{options[:uuid]}_"+self.options[:name]+"_output_%03d" % (index+1).to_s + "#{self.options[:parameter_value]}"
|
26
25
|
commandline.gsub!(/<output>/,job_output)
|
27
26
|
job_output << ".#{extension}"
|
28
27
|
else
|
29
28
|
self.options[:output_folder] = true
|
30
|
-
job_output = self.options[:output]+"/#{
|
29
|
+
job_output = self.options[:output]+"/#{options[:uuid]}_"+self.options[:name]
|
31
30
|
commandline.gsub!(/<output>/,job_output)
|
32
31
|
end
|
33
32
|
self.instructions << commandline+"\n"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-grid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
segments:
|
148
148
|
- 0
|
149
|
-
hash:
|
149
|
+
hash: 3769977352097433669
|
150
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
151
|
none: false
|
152
152
|
requirements:
|