sushi_fabric 1.0.3 → 1.0.8

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: b645fb8369eee1152493ef424f092cd00f0a5a08c27cb78d4b081e17c0b18784
4
- data.tar.gz: 2630d702479d4eac533f737e226c80cbe115598d891eb526ec1f8e7004fc9481
3
+ metadata.gz: be295ca72915f5b15f5d1b06c062eedd66c2ebbf392f3e3263483d5b803249a4
4
+ data.tar.gz: d40e4224538f01ac25adf99eb3c701daf04d22a0a1be0f1a935173f798b23007
5
5
  SHA512:
6
- metadata.gz: a68e3cee864cc0cd12b5335b9d8d1eb8688175870455b61d4153109c8d98e5d77846d4ef87d50bec8c1dde624511cfde6b60de1110724b1878ccc19af91bd6ea
7
- data.tar.gz: 331228ad3cebe41dbf0b6b921e2284d1030e2948f92b2ecebbc9955242ec3c47730b972e367947018114748e0fe9c65a6f9e3660896047684370b3f8fabfd8c5
6
+ metadata.gz: e141d4d84bf0efea4180f578b345b8daf037bf1fd62147f1ac9e40e1684dcbdecc428994ff651b364ddcc0ec48d8c2d6a6ca952e7ad493ce4d3d3048a695acf2
7
+ data.tar.gz: d16896e1fabc9c4bb683c0268fbb6908c3b9a8f2fe037b669ce5f7aad89b5c982c21f66f73561be787025d48667fed09f2a4d402a3de5ed7ba4110fd39dea122
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- # Version = '20201218-155451'
3
+ # Version = '20210304-164250'
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
@@ -466,12 +467,27 @@ conda activate sushi
466
467
  EOS
467
468
  end
468
469
 
470
+ src_files = []
471
+ dest_dirs = []
472
+ greq = (copy_commands("AAA", "BBB").join =~ /g-req/)
469
473
  if @output_files
470
474
  @output_files.map{|header| next_dataset[header]}.each do |file|
471
- # in actual case, to save under /srv/gstore/
472
475
  src_file = File.basename(file)
473
476
  dest_dir = File.dirname(File.join(@gstore_dir, file))
477
+ src_files << src_file
478
+ dest_dirs << dest_dir
479
+ end
480
+ if dest_dirs.uniq.length == 1 and greq
481
+ src_file = src_files.join(" ")
482
+ dest_dir = dest_dirs.first
474
483
  @out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
484
+ else
485
+ @output_files.map{|header| next_dataset[header]}.each do |file|
486
+ # in actual case, to save under /srv/gstore/
487
+ src_file = File.basename(file)
488
+ dest_dir = File.dirname(File.join(@gstore_dir, file))
489
+ @out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
490
+ end
475
491
  end
476
492
  end
477
493
  @out.print <<-EOF
@@ -864,17 +880,7 @@ rm -rf #{@scratch_dir} || exit 1
864
880
  save_parameters_as_tsv
865
881
  save_input_dataset_as_tsv
866
882
 
867
- if SushiFabric::Application.config.fgcz?
868
- # this causes sqlite3 IO error in Mac OSX (Yosemite)
869
- pid = Process.fork do
870
- Process.fork do
871
- main
872
- end # grand-child process
873
- end # child process
874
- Process.waitpid pid
875
- else
876
- main
877
- end
883
+ main
878
884
  end
879
885
  def make_dummy_files
880
886
  dummy_files_header = []
@@ -1,3 +1,3 @@
1
1
  module SushiFabric
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.8"
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.3
4
+ version: 1.0.8
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: 2020-12-18 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler