rbbt-util 5.25.35 → 5.25.36

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
  SHA1:
3
- metadata.gz: 5c6d0758e3a1fb39aad8fe7f3f2a077299e5f7b8
4
- data.tar.gz: c03e87fa3dca241c06e1512b98d9832502a428fb
3
+ metadata.gz: 3cb4de42b4e6fbf447040583f2415cabed0c5f09
4
+ data.tar.gz: 3c71fd929873349764d6b99d973ab7a0640b44a2
5
5
  SHA512:
6
- metadata.gz: cc83f79920d2738482acb2a7af927851752d5604e6ddd3961ffaca60f5e988c988fb8cb6496fb47f1f75e54f6ddc64b9aac5513e9e7daa1648413fc098151841
7
- data.tar.gz: d59e75e983e285216095f902cd5cd83402a45700c31d5b8bb8c3b6acee976c723bdb46334e6cea2e2d0a80d8ddf5749b8b0989e360ee3c09ceeb9c27882ab678
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.35
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-21 00:00:00.000000000 Z
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