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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a9c780f513fc42be122da7a0cb97e5e8c4a70e84af98ea746964a5b7853f1c5
4
- data.tar.gz: 4d14ca10808dbee2401088cc885d77ac2c4040ca73a984993f833b42d049ade8
3
+ metadata.gz: 35b2e022d1f18333d99515a5032500f8c9737cdeb924bf8af1fc23167a85847a
4
+ data.tar.gz: 7610de543b92274995a7e5ef0cfaa17cc12686106003da9e9e095d58727757de
5
5
  SHA512:
6
- metadata.gz: 8639f58865956062ecd97f269dd426c2674ada7d602850520b323370150b50e99cfed4a5a60e67fa001fbd9035a806a4ef426f1b7db03fb5312a0fa5d36a412e
7
- data.tar.gz: 0d2f463786f8397c73cba8026cd2b1ac0f4a1fbda5252ca598c39f4aaf81d25c1d6d6c9020739f2c31ecee59857ee5d09ace1f4f9a1aa675694c4cf932273b59
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 = '20210115-105702'
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
- parent_data_set_job_ids = parent_data_set.jobs.map{|job| job.submit_job_id}.join(",")
415
- "#\$ -hold_jid #{parent_data_set_job_ids}"
416
- else
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
@@ -1,3 +1,3 @@
1
1
  module SushiFabric
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.9"
3
3
  end
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
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-01-15 00:00:00.000000000 Z
11
+ date: 2021-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler