rbbt-util 5.25.35 → 5.25.36
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/rbbt/hpc.rb +3 -0
- data/lib/rbbt/persist.rb +4 -0
- data/share/rbbt_commands/stat/boxplot +56 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cb4de42b4e6fbf447040583f2415cabed0c5f09
|
4
|
+
data.tar.gz: 3c71fd929873349764d6b99d973ab7a0640b44a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e5624f00564d63699a241fda887d27eb805907178a706a7a40a0b78b423282aa129bbe5b008cd09fc5983e008d5e2d16795e0bf55274888e4b408e02581ad4b
|
7
|
+
data.tar.gz: 2db3140abdf4fe08f4ed7190bc6cf7b2d65e2b2df10e40370187053a33a941b0e65eb25ae86dc46c5c893e55d3935f403471fc03cf9138d44e0639287d2d4b3a
|
data/lib/rbbt/hpc.rb
CHANGED
@@ -23,6 +23,7 @@ module Marenostrum
|
|
23
23
|
exclusive = options.delete :exclusive
|
24
24
|
highmem = options.delete :highmem
|
25
25
|
inputs_dir = options.delete :inputs_dir
|
26
|
+
config_keys = options.delete :config_keys
|
26
27
|
|
27
28
|
if contain_and_sync
|
28
29
|
contain = "/scratch/tmp/rbbt" if contain.nil?
|
@@ -39,6 +40,8 @@ module Marenostrum
|
|
39
40
|
|
40
41
|
rbbt_cmd = args.reject{|e| e == '--' }.collect{|e| e.include?(" ")? '"' + e + '"' : e } * " "
|
41
42
|
|
43
|
+
rbbt_cmd << " --config_keys='#{config_keys}'"
|
44
|
+
|
42
45
|
queue = options[:queue] || 'bsc_ls'
|
43
46
|
tasks = options[:tasks] || 1
|
44
47
|
nodes = options[:nodes] || 1
|
data/lib/rbbt/persist.rb
CHANGED
@@ -493,6 +493,10 @@ module LocalPersist
|
|
493
493
|
@local_persist_dir
|
494
494
|
end
|
495
495
|
|
496
|
+
def local_persist_dir=(value)
|
497
|
+
@local_persist_dir = value
|
498
|
+
end
|
499
|
+
|
496
500
|
def local_persist(name, type = nil, options= {}, persist_options = nil, &block)
|
497
501
|
persist_options ||= {}
|
498
502
|
persist_options = {:dir => local_persist_dir}.merge persist_options
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rbbt-util'
|
4
|
+
require 'rbbt/util/simpleopt'
|
5
|
+
|
6
|
+
$0 = "rbbt #{$previous_commands*""} #{ File.basename(__FILE__) }" if $previous_commands
|
7
|
+
|
8
|
+
options = SOPT.setup <<EOF
|
9
|
+
|
10
|
+
Produce a heatmap
|
11
|
+
|
12
|
+
$ rbbt stat heatmap [options] <filename.tsv> [file.png]
|
13
|
+
|
14
|
+
-h--help Print this help
|
15
|
+
-w--width* Image Width
|
16
|
+
-h--height* Image Height
|
17
|
+
-s--size* Image Size (Height and Width)
|
18
|
+
|
19
|
+
EOF
|
20
|
+
if options[:help]
|
21
|
+
if defined? rbbt_usage
|
22
|
+
rbbt_usage
|
23
|
+
else
|
24
|
+
puts SOPT.usage
|
25
|
+
end
|
26
|
+
exit 0
|
27
|
+
end
|
28
|
+
|
29
|
+
file, png = ARGV
|
30
|
+
|
31
|
+
raise "No file" if file.nil?
|
32
|
+
|
33
|
+
width, height, size, logs, positive = options.values_at :width, :height, :size, :logs, :positive
|
34
|
+
|
35
|
+
size = 800 if size.nil?
|
36
|
+
width = size if width.nil?
|
37
|
+
height = size if height.nil?
|
38
|
+
logs = false if logs.nil?
|
39
|
+
positive = false if positive.nil?
|
40
|
+
|
41
|
+
|
42
|
+
require 'rbbt/util/R'
|
43
|
+
if png
|
44
|
+
R.run <<-EOF
|
45
|
+
data = rbbt.tsv2matrix(rbbt.tsv('#{file}'))
|
46
|
+
rbbt.png_plot('#{png}', 'boxplot(data)', width=#{ width }, height=#{ height })
|
47
|
+
EOF
|
48
|
+
else
|
49
|
+
TmpFile.with_file(nil, :extension => 'png') do |png|
|
50
|
+
R.run <<-EOF
|
51
|
+
data = rbbt.tsv2matrix(rbbt.tsv('#{file}'))
|
52
|
+
rbbt.png_plot('#{png}', 'boxplot(data)', width=#{ width }, height=#{ height })
|
53
|
+
EOF
|
54
|
+
`eog #{png}`
|
55
|
+
end
|
56
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.25.
|
4
|
+
version: 5.25.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -360,6 +360,7 @@ files:
|
|
360
360
|
- share/rbbt_commands/resource/produce
|
361
361
|
- share/rbbt_commands/rsync
|
362
362
|
- share/rbbt_commands/stat/abs
|
363
|
+
- share/rbbt_commands/stat/boxplot
|
363
364
|
- share/rbbt_commands/stat/compare_lists
|
364
365
|
- share/rbbt_commands/stat/density
|
365
366
|
- share/rbbt_commands/stat/heatmap
|