sushi_fabric 1.2.2 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18274b38a1b2b7a5c044435c9fb66406f865690b2807b01413d3fe349d1cdb90
4
- data.tar.gz: 82d53f12e77604cc72b334103c0330e08b458ea4220579cd1f6284a4ee918bea
3
+ metadata.gz: 28252c62a5ac77892808193b02a694e48bf56c5f28cbe11ad8c26eb3076fd5d4
4
+ data.tar.gz: 9c15be2d98e78916fac71ebd653761e50b0b0f6ace6698ee15a277d73e28aea8
5
5
  SHA512:
6
- metadata.gz: 9199dd3d05f40b71e86c1277dde1970200ff8c89e95547853e22acd66ad0ccdc8c7a6bf27fc1d2f6520796c26bc7adb569d1dc23cadff45ba20fc3db54c977ad
7
- data.tar.gz: 534f1f1ea9e36c750255affed0925db10389fd9f27aacb13660e4638dc127c64f63f1b70b4fa15012c28514e46570c1488cc73efc0a9d4bdce9acd726f07a230
6
+ metadata.gz: 67e11563c751c2c2905f8109046d376c24fd16418707d7e39be79fae7b6c93a01a300cbed6d5fdcf97984af1e613510602a44add4358528affb58fe3b0de0994
7
+ data.tar.gz: 368bebe991f06642d8202eb7f65a97cb2dd6e762e01c712a1841e16350513dd45b59ef8b822a049163c383f5a00698057740faac540584158b71f97885e9b069
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- # Version = '20230623-165238'
3
+ # Version = '20231208-144616'
4
4
 
5
5
  require 'csv'
6
6
  require 'fileutils'
@@ -233,6 +233,7 @@ class SushiApp
233
233
  attr_accessor :next_dataset_bfabric_application_number
234
234
  attr_reader :inactivate_nodes
235
235
  attr_reader :employee
236
+ attr_accessor :queue
236
237
 
237
238
  def initialize
238
239
  @gstore_dir = GSTORE_DIR
@@ -349,7 +350,9 @@ class SushiApp
349
350
  end
350
351
  def check_application_parameters
351
352
  if @required_params and (@required_params - @params.keys).empty?
352
- @output_params = {"sushi_app" => self.class.name}.merge(@params.clone)
353
+ # PD, 20230623, the following fix changed parameters.tsv info, and reverted
354
+ #@output_params = {"sushi_app" => self.class.name}.merge(@params.clone)
355
+ @output_params = @params.clone
353
356
  end
354
357
  end
355
358
  def set_user_parameters
@@ -494,13 +497,13 @@ conda activate sushi
494
497
  if dest_dirs.uniq.length == 1 and greq
495
498
  src_file = src_files.join(" ")
496
499
  dest_dir = dest_dirs.first
497
- @out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
500
+ @out.print copy_commands(src_file, dest_dir, nil, @queue).join("\n"), "\n"
498
501
  else
499
502
  @output_files.map{|header| next_dataset[header]}.each do |file|
500
503
  # in actual case, to save under /srv/gstore/
501
504
  src_file = File.basename(file)
502
505
  dest_dir = File.dirname(File.join(@gstore_dir, file))
503
- @out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
506
+ @out.print copy_commands(src_file, dest_dir, nil, @queue).join("\n"), "\n"
504
507
  end
505
508
  end
506
509
  end
@@ -588,6 +591,7 @@ rm -rf #{@scratch_dir} || exit 1
588
591
  def save_parameters_as_tsv
589
592
  file_path = File.join(@scratch_result_dir, @parameter_file)
590
593
  CSV.open(file_path, 'w', :col_sep=>"\t") do |out|
594
+ out << ["sushi_app", self.class.name]
591
595
  @output_params.each do |key, value|
592
596
  if @output_params[key, 'file_upload'] and !value.to_s.empty?
593
597
  uploaded_file_path = File.join(@result_dir, "uploaded", File.basename(value))
@@ -629,12 +633,12 @@ rm -rf #{@scratch_dir} || exit 1
629
633
  end
630
634
  file_path
631
635
  end
632
- def copy_commands(org_dir, dest_parent_dir, now=nil)
636
+ def copy_commands(org_dir, dest_parent_dir, now=nil, queue="light")
633
637
  @workflow_manager||=DRbObject.new_with_uri(WORKFLOW_MANAGER)
634
638
  com = ''
635
639
  cnt_retry = 0
636
640
  begin
637
- com = @workflow_manager.copy_commands(org_dir, dest_parent_dir, now)
641
+ com = @workflow_manager.copy_commands(org_dir, dest_parent_dir, now, queue)
638
642
  rescue => e
639
643
  time = Time.now.strftime("[%Y.%m.%d %H:%M:%S]")
640
644
  @logger.error("*"*50)
@@ -1,3 +1,3 @@
1
1
  module SushiFabric
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.4"
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.2.2
4
+ version: 1.2.4
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: 2023-06-23 00:00:00.000000000 Z
11
+ date: 2023-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler