sushi_fabric 0.9.4 → 0.9.9
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.
- checksums.yaml +5 -5
- data/lib/sushi_fabric/sushiApp.rb +46 -29
- data/lib/sushi_fabric/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 379a56d5261eb7ed21137bd452583eb76e416cf774c987628b0d1c847bed6040
|
4
|
+
data.tar.gz: b68363a7da5c166ab7c38d8310b9d151ce490a1d3d4f6d48bdfa5a3484c0abf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15cbf3c8954c15999a91a5ab0e0f53dffc9a2ded3ecc5b0633e1d31c6480102cf44e245c94735c2d52251bdbc58c6262c7070b0b9853e7048659dbd5135130e9
|
7
|
+
data.tar.gz: b936c6a57a6683b1a19874627eb9bc4ba1719d0664f85794e4ee9d0face5eba3d424e06fd60158afbb53dc9b3b1c9b1330e94fdacdc17262f64ed1fdd1310eac
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20200724-111508'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -227,6 +227,7 @@ class SushiApp
|
|
227
227
|
attr_accessor :mango_run_name
|
228
228
|
attr_accessor :input_dataset_bfabric_application_number
|
229
229
|
attr_accessor :next_dataset_bfabric_application_number
|
230
|
+
attr_reader :inactivate_nodes
|
230
231
|
def initialize
|
231
232
|
@gstore_dir = GSTORE_DIR
|
232
233
|
@project = nil
|
@@ -236,6 +237,7 @@ class SushiApp
|
|
236
237
|
@params['ram'] = nil
|
237
238
|
@params['scratch'] = nil
|
238
239
|
@params['node'] = ''
|
240
|
+
@params['queue'] = ''
|
239
241
|
@params['process_mode'] = 'SAMPLE'
|
240
242
|
@params['samples'] = ''
|
241
243
|
@job_ids = []
|
@@ -390,8 +392,13 @@ class SushiApp
|
|
390
392
|
end
|
391
393
|
def check_latest_module_version(mod)
|
392
394
|
command_out = %x[ bash -lc "source #{@module_source}; module whatis #{mod} 2>&1" ]
|
393
|
-
latest_mod =
|
394
|
-
|
395
|
+
latest_mod = nil
|
396
|
+
command_out.split("\n").each do |line|
|
397
|
+
if line =~ /#{mod}/
|
398
|
+
latest_mod = line.split.first
|
399
|
+
break
|
400
|
+
end
|
401
|
+
end
|
395
402
|
latest_mod
|
396
403
|
end
|
397
404
|
def job_header
|
@@ -415,7 +422,6 @@ class SushiApp
|
|
415
422
|
modules_with_version = @modules.map{|mod| check_latest_module_version(mod)}
|
416
423
|
modules_with_version.compact!
|
417
424
|
"module add #{modules_with_version.join(' ')}"
|
418
|
-
#"module add #{@modules.join(' ')}"
|
419
425
|
else
|
420
426
|
""
|
421
427
|
end
|
@@ -754,28 +760,14 @@ rm -rf #{@scratch_dir} || exit 1
|
|
754
760
|
if mock
|
755
761
|
make_dummy_files
|
756
762
|
end
|
757
|
-
copy_inputdataset_parameter_jobscripts
|
758
763
|
|
759
|
-
# job submittion
|
760
|
-
gstore_job_script_paths = []
|
761
|
-
@job_scripts.each_with_index do |job_script, i|
|
762
|
-
if job_id = submit(job_script, mock)
|
763
|
-
@job_ids << job_id
|
764
|
-
print "Submit job #{File.basename(job_script)} job_id=#{job_id}"
|
765
|
-
gstore_job_script_paths << File.join(@gstore_script_dir, File.basename(job_script))
|
766
|
-
end
|
767
|
-
end
|
768
|
-
|
769
|
-
puts
|
770
|
-
print 'job scripts: '
|
771
|
-
p @job_scripts
|
772
764
|
print 'result dataset: '
|
773
765
|
p @result_dataset
|
774
766
|
|
775
767
|
# copy application data to gstore
|
776
768
|
@next_dataset_tsv_path = save_next_dataset_as_tsv
|
777
769
|
|
778
|
-
if
|
770
|
+
if @dataset_sushi_id and dataset = DataSet.find_by_id(@dataset_sushi_id.to_i)
|
779
771
|
data_set_arr = []
|
780
772
|
headers = []
|
781
773
|
rows = []
|
@@ -800,20 +792,45 @@ rm -rf #{@scratch_dir} || exit 1
|
|
800
792
|
unless @off_bfabric_registration
|
801
793
|
if next_dataset = DataSet.find_by_id(@next_dataset_id)
|
802
794
|
next_dataset.register_bfabric(bfabric_application_number: @next_dataset_bfabric_application_number)
|
795
|
+
if next_dataset.workunit_id
|
796
|
+
@job_scripts.each do |job_script|
|
797
|
+
open(job_script, "a") do |out|
|
798
|
+
out.puts "WORKUNIT_ID=#{next_dataset.workunit_id}"
|
799
|
+
out.puts "update_resource_size -w $WORKUNIT_ID"
|
800
|
+
end
|
801
|
+
end
|
802
|
+
end
|
803
803
|
end
|
804
804
|
end
|
805
|
+
end
|
806
|
+
end
|
807
|
+
copy_inputdataset_parameter_jobscripts
|
808
|
+
|
809
|
+
# job submittion
|
810
|
+
gstore_job_script_paths = []
|
811
|
+
@job_scripts.each_with_index do |job_script, i|
|
812
|
+
if job_id = submit(job_script, mock)
|
813
|
+
@job_ids << job_id
|
814
|
+
print "Submit job #{File.basename(job_script)} job_id=#{job_id}"
|
815
|
+
gstore_job_script_paths << File.join(@gstore_script_dir, File.basename(job_script))
|
816
|
+
end
|
817
|
+
end
|
818
|
+
|
819
|
+
puts
|
820
|
+
print 'job scripts: '
|
821
|
+
p @job_scripts
|
805
822
|
|
806
|
-
# save job and dataset relation in Sushi DB
|
807
|
-
job_ids.each_with_index do |job_id, i|
|
808
|
-
new_job = Job.new
|
809
|
-
new_job.submit_job_id = job_id.to_i
|
810
|
-
new_job.script_path = gstore_job_script_paths[i]
|
811
|
-
new_job.next_dataset_id = @next_dataset_id
|
812
|
-
new_job.save
|
813
|
-
new_job.data_set.jobs << new_job
|
814
|
-
new_job.data_set.save
|
815
|
-
end
|
816
823
|
|
824
|
+
unless @job_ids.empty? or NO_ROR
|
825
|
+
# save job and dataset relation in Sushi DB
|
826
|
+
job_ids.each_with_index do |job_id, i|
|
827
|
+
new_job = Job.new
|
828
|
+
new_job.submit_job_id = job_id.to_i
|
829
|
+
new_job.script_path = gstore_job_script_paths[i]
|
830
|
+
new_job.next_dataset_id = @next_dataset_id
|
831
|
+
new_job.save
|
832
|
+
new_job.data_set.jobs << new_job
|
833
|
+
new_job.data_set.save
|
817
834
|
end
|
818
835
|
end
|
819
836
|
copy_nextdataset
|
data/lib/sushi_fabric/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sushi_fabric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Functional Genomics Center Zurich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
|
88
|
-
rubygems_version: 2.6.14
|
87
|
+
rubygems_version: 3.0.3
|
89
88
|
signing_key:
|
90
89
|
specification_version: 4
|
91
90
|
summary: workflow manager client.
|