sushi_fabric 1.1.3 → 1.1.4
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 +29 -2
- 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: b34ce73bf64c4447679ec3fa06820fccf59857ea739a9b16e9a91907051c1894
|
4
|
+
data.tar.gz: 5d7f45f91531ecb9c7014b6b3694622694b6257845b607cec8819256cbff9a2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 190e59e9c16c3e1031fdc929e6c4a3627cd63d0e1b6ecaf95aeba88158a08af587a398c9903efbcaf3efdc2cafafd39f015a3714365e4b7ed45adcdb18b83a66
|
7
|
+
data.tar.gz: 5ee4d5c6a57b06fedb6cecdf0cc396376846e1fe1ed41d431f3104ab140e0bfd0dbb34cb4df144e0cd08390315355498e09228509ded24ab976466d155358c80
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20211207-151042'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -384,14 +384,23 @@ class SushiApp
|
|
384
384
|
@result_dir = File.join(@project, @result_dir_base)
|
385
385
|
@scratch_result_dir = File.join(SCRATCH_DIR, @result_dir_base)
|
386
386
|
@job_script_dir = File.join(@scratch_result_dir, 'scripts')
|
387
|
+
@uploaded_files_dir = File.join(@scratch_result_dir, 'uploaded')
|
387
388
|
@gstore_result_dir = File.join(@gstore_dir, @result_dir)
|
388
389
|
@gstore_script_dir = File.join(@gstore_result_dir, 'scripts')
|
389
390
|
@gstore_project_dir = File.join(@gstore_dir, @project)
|
391
|
+
@gstore_uploaded_dir = File.join(@gstore_result_dir, 'uploaded')
|
390
392
|
set_file_paths
|
391
393
|
end
|
392
394
|
def prepare_result_dir
|
393
395
|
FileUtils.mkdir_p(@scratch_result_dir)
|
394
396
|
FileUtils.mkdir_p(@job_script_dir)
|
397
|
+
@uploaded_files = []
|
398
|
+
@params.each do |key, value|
|
399
|
+
if @params[key, 'file_upload']
|
400
|
+
FileUtils.mkdir_p(@uploaded_files_dir)
|
401
|
+
@uploaded_files << value
|
402
|
+
end
|
403
|
+
end
|
395
404
|
end
|
396
405
|
def check_latest_modules_version(modules)
|
397
406
|
command_out = %x[ bash -lc "source #{@module_source}; module whatis #{modules.join(" ")} 2>&1" | cut -f 1 -d " " | uniq ]
|
@@ -577,7 +586,12 @@ rm -rf #{@scratch_dir} || exit 1
|
|
577
586
|
CSV.open(file_path, 'w', :col_sep=>"\t") do |out|
|
578
587
|
out << ["sushi_app", self.class.name]
|
579
588
|
@output_params.each do |key, value|
|
580
|
-
|
589
|
+
if @output_params[key, 'file_upload']
|
590
|
+
uploaded_file_path = File.join(@gstore_uploaded_dir, File.basename(value))
|
591
|
+
out << [key, uploaded_file_path]
|
592
|
+
else
|
593
|
+
out << [key, value]
|
594
|
+
end
|
581
595
|
end
|
582
596
|
end
|
583
597
|
file_path
|
@@ -629,6 +643,18 @@ rm -rf #{@scratch_dir} || exit 1
|
|
629
643
|
end
|
630
644
|
com
|
631
645
|
end
|
646
|
+
def copy_uploaded_files
|
647
|
+
if not @uploaded_files.empty?
|
648
|
+
@uploaded_files.each do |file|
|
649
|
+
FileUtils.cp(file, @uploaded_files_dir)
|
650
|
+
command = "cp #{file} #{@uploaded_files_dir}"
|
651
|
+
puts command
|
652
|
+
FileUtils.rm_r(File.dirname(file))
|
653
|
+
command = "rm -rf #{File.dirname(file)}"
|
654
|
+
puts command
|
655
|
+
end
|
656
|
+
end
|
657
|
+
end
|
632
658
|
def copy_inputdataset_parameter_jobscripts
|
633
659
|
org = @scratch_result_dir
|
634
660
|
dest = @gstore_project_dir
|
@@ -841,6 +867,7 @@ rm -rf #{@scratch_dir} || exit 1
|
|
841
867
|
end
|
842
868
|
end
|
843
869
|
end
|
870
|
+
copy_uploaded_files
|
844
871
|
copy_inputdataset_parameter_jobscripts
|
845
872
|
|
846
873
|
# job submittion
|
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.1.
|
4
|
+
version: 1.1.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: 2021-
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|