sushi_fabric 1.0.4 → 1.0.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 +4 -4
- data/lib/sushi_fabric/sushiApp.rb +26 -9
- data/lib/sushi_fabric/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b2e022d1f18333d99515a5032500f8c9737cdeb924bf8af1fc23167a85847a
|
4
|
+
data.tar.gz: 7610de543b92274995a7e5ef0cfaa17cc12686106003da9e9e095d58727757de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57c7a0d1834299762b01d2e192aa855d07fbb04c3a304c24968a637f3ebab3e64ad0775ad465b9002156303c91551b28b0126a5412f1f2dbf9871ad71ea4a3aa
|
7
|
+
data.tar.gz: 003d07dbbbe71b0a02535b17d7e3f7cb2166141708575cde12d66aa9bdb50df19c977459e63a0ba0fbff73a2fa251c8929852cd38f7c6acf4c5d1190c24df802
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20210410-141359'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -228,6 +228,8 @@ class SushiApp
|
|
228
228
|
attr_accessor :input_dataset_bfabric_application_number
|
229
229
|
attr_accessor :next_dataset_bfabric_application_number
|
230
230
|
attr_reader :inactivate_nodes
|
231
|
+
attr_reader :employee
|
232
|
+
|
231
233
|
def initialize
|
232
234
|
@gstore_dir = GSTORE_DIR
|
233
235
|
@project = nil
|
@@ -410,12 +412,11 @@ class SushiApp
|
|
410
412
|
else
|
411
413
|
@scratch_result_dir + '_temp$$'
|
412
414
|
end
|
413
|
-
hold_jid_option = if @dataset_sushi_id and parent_data_set = DataSet.find_by_id(@dataset_sushi_id.to_i) and !parent_data_set.jobs.empty?
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
end
|
415
|
+
hold_jid_option = if @dataset_sushi_id and parent_data_set = DataSet.find_by_id(@dataset_sushi_id.to_i) and !parent_data_set.jobs.empty? and parent_data_set_job_ids = parent_data_set.jobs.map{|job| job.submit_job_id} and !parent_data_set_job_ids.join.empty?
|
416
|
+
"#SBATCH --dependency=afterany:#{parent_data_set_job_ids.join(":")}"
|
417
|
+
else
|
418
|
+
''
|
419
|
+
end
|
419
420
|
module_src_command = if @module_source and @modules and !@modules.empty?
|
420
421
|
"source #{@module_source}"
|
421
422
|
else
|
@@ -431,7 +432,8 @@ class SushiApp
|
|
431
432
|
@logger.error("# Error in checking modules ")
|
432
433
|
@logger.error("# Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}")
|
433
434
|
@logger.error("#"*100)
|
434
|
-
"exit # Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}"
|
435
|
+
# "exit # Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}"
|
436
|
+
""
|
435
437
|
end
|
436
438
|
else
|
437
439
|
""
|
@@ -466,12 +468,27 @@ conda activate sushi
|
|
466
468
|
EOS
|
467
469
|
end
|
468
470
|
|
471
|
+
src_files = []
|
472
|
+
dest_dirs = []
|
473
|
+
greq = (copy_commands("AAA", "BBB").join =~ /g-req/)
|
469
474
|
if @output_files
|
470
475
|
@output_files.map{|header| next_dataset[header]}.each do |file|
|
471
|
-
# in actual case, to save under /srv/gstore/
|
472
476
|
src_file = File.basename(file)
|
473
477
|
dest_dir = File.dirname(File.join(@gstore_dir, file))
|
478
|
+
src_files << src_file
|
479
|
+
dest_dirs << dest_dir
|
480
|
+
end
|
481
|
+
if dest_dirs.uniq.length == 1 and greq
|
482
|
+
src_file = src_files.join(" ")
|
483
|
+
dest_dir = dest_dirs.first
|
474
484
|
@out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
|
485
|
+
else
|
486
|
+
@output_files.map{|header| next_dataset[header]}.each do |file|
|
487
|
+
# in actual case, to save under /srv/gstore/
|
488
|
+
src_file = File.basename(file)
|
489
|
+
dest_dir = File.dirname(File.join(@gstore_dir, file))
|
490
|
+
@out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
|
491
|
+
end
|
475
492
|
end
|
476
493
|
end
|
477
494
|
@out.print <<-EOF
|
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: 1.0.
|
4
|
+
version: 1.0.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: 2021-
|
11
|
+
date: 2021-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|