sushi_fabric 1.0.0 → 1.0.1
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 +22 -12
- 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: 6bb6ed61655c7decac6439f7bd3c73784888ae9686d2611c10f9d4c40bda0621
|
4
|
+
data.tar.gz: 91e98688ac53cfc55560decb2537ee1b38e9c93d24ffb4cfae02875088e2e910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2ffd594a92358285b0996f0fa06053af38cb65cfe337049b0e619f7e590fdd8ae91b005adfa50c088ced30b7c8235dd7f6d469f36284af62e5a94f5bab7d4b7
|
7
|
+
data.tar.gz: b5ee9600a1e1b2fe1d76b27bc37cc30a230a5cafb0e613fb5ab13f587ddade33e8f365c87be81e315239d78fb90c99bffe9f65d5ede95f62c8947c1c540be75a
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20201105-115625'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -390,16 +390,18 @@ class SushiApp
|
|
390
390
|
FileUtils.mkdir_p(@scratch_result_dir)
|
391
391
|
FileUtils.mkdir_p(@job_script_dir)
|
392
392
|
end
|
393
|
-
def
|
394
|
-
command_out = %x[ bash -lc "source #{@module_source}; module whatis #{
|
395
|
-
|
396
|
-
command_out.split("\n").each do |
|
397
|
-
|
398
|
-
|
399
|
-
|
393
|
+
def check_latest_modules_version(modules)
|
394
|
+
command_out = %x[ bash -lc "source #{@module_source}; module whatis #{modules.join(" ")} 2>&1" | cut -f 1 -d " " | sort | uniq ]
|
395
|
+
latest_modules = []
|
396
|
+
command_out.split("\n").each do |line_|
|
397
|
+
line = line_.chomp
|
398
|
+
unless line.empty?
|
399
|
+
if line =~ /#{modules.join("|")}/
|
400
|
+
latest_modules << line
|
401
|
+
end
|
400
402
|
end
|
401
403
|
end
|
402
|
-
|
404
|
+
latest_modules
|
403
405
|
end
|
404
406
|
def job_header
|
405
407
|
@scratch_dir = if @params['process_mode'] == 'SAMPLE'
|
@@ -419,9 +421,17 @@ class SushiApp
|
|
419
421
|
""
|
420
422
|
end
|
421
423
|
module_add_commands = if @modules and !@modules.empty?
|
422
|
-
modules_with_version = @modules
|
423
|
-
modules_with_version.
|
424
|
-
|
424
|
+
modules_with_version = check_latest_modules_version(@modules)
|
425
|
+
if @modules.length == modules_with_version.length
|
426
|
+
modules_with_version.compact!
|
427
|
+
"module add #{modules_with_version.join(' ')}"
|
428
|
+
else
|
429
|
+
@logger.error("#"*100)
|
430
|
+
@logger.error("# Error in checking modules ")
|
431
|
+
@logger.error("# Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}")
|
432
|
+
@logger.error("#"*100)
|
433
|
+
"exit # Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}"
|
434
|
+
end
|
425
435
|
else
|
426
436
|
""
|
427
437
|
end
|
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.1
|
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-
|
11
|
+
date: 2020-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|