rbbt-util 5.21.95 → 5.21.96

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8627482cbd18d7d3a64ca31e0d6c1035f741523
4
- data.tar.gz: 3ec4150b254df3faaec0645421da191703778eb5
3
+ metadata.gz: 344b1f349d4ccc887c8d880f838de53f58d82db7
4
+ data.tar.gz: cc0fef8d5aa0732de3e65b912523696597701efd
5
5
  SHA512:
6
- metadata.gz: da8334e8b9488bda2d6e24503b7ec0910b984d6f324730424e925c4a43d6614960bf3779c71872486e9cf759de6f428bd21550449e736857be334dd2d0fa7cee
7
- data.tar.gz: 0b76b13dc1a568c0238c40564f4f159713fa6a597bf27058face9d6c32fa9f255d06615143615f58e97dc6196c38ff6d0f6aed90df88e4edaaa060167cbdaaed
6
+ metadata.gz: 53fc4f324fa46d7841b64fc47db959f58a9c87202de32a840e91a4ee846e124b56496fe3c3bab4e2e3d8b3ec31032ff3fe87668db6d9393b1a709459ff7db59b
7
+ data.tar.gz: 9ee1e9a13ca24eb82efda2b69bdf6e3a6d6b806ad3ae49b156788c316d4e6a5a0cb6050029b234db465ae8b6c9347217379fb5df17759844999cf30c29c02969
@@ -205,6 +205,7 @@ module TSV
205
205
  end
206
206
  end
207
207
 
208
+ options[:monitor] = bar
208
209
  if callback
209
210
  bar.init if bar
210
211
  exception = nil
@@ -222,7 +223,6 @@ module TSV
222
223
  raise exception if exception
223
224
  end
224
225
  else
225
- options[:monitor] = bar
226
226
  TSV::Parser.traverse(io, options.merge(:monitor => bar), &block)
227
227
  end
228
228
  Log::ProgressBar.remove_bar(bar) if bar
@@ -517,7 +517,8 @@ module TSV
517
517
  end
518
518
 
519
519
  def traverse(options = {})
520
- monitor, grep, invert_grep, head = Misc.process_options options, :monitor, :grep, :invert_grep, :head
520
+ monitor, bar, grep, invert_grep, head = Misc.process_options options, :monitor, :bar, :grep, :invert_grep, :head
521
+ monitor = bar if bar and monitor.nil?
521
522
  raise "No block given in TSV::Parser#traverse" unless block_given?
522
523
 
523
524
  stream = @stream
@@ -540,6 +541,7 @@ module TSV
540
541
  end
541
542
 
542
543
  progress_monitor, monitor = monitor, nil if Log::ProgressBar === monitor
544
+
543
545
  # setup monitor
544
546
  if monitor and (stream.respond_to?(:size) or (stream.respond_to?(:stat) and stream.stat.respond_to? :size and stream.respond_to?(:pos)))
545
547
  size = case
@@ -311,7 +311,7 @@ module Misc
311
311
  parts = line.split(sep, -1)
312
312
  chr, start, eend, *rest = parts
313
313
  start = start.to_i
314
- if eend =~ /^\d+$/
314
+ if eend =~ /^\d+(\t.*)?$/
315
315
  eend = eend.to_i
316
316
  else
317
317
  eend = start.to_i
@@ -766,6 +766,7 @@ module Workflow
766
766
  compute = nil
767
767
  end
768
768
 
769
+ options = IndiferentHash.setup(options.dup)
769
770
  dep = dependency.call jobname, options.merge(_inputs), real_dependencies
770
771
 
771
772
  dep = [dep] unless Array === dep
@@ -781,6 +782,7 @@ module Workflow
781
782
  }
782
783
  dep = new_
783
784
  else
785
+ _inputs = IndiferentHash.setup(_inputs.dup)
784
786
  dep = dependency.call jobname, _inputs, real_dependencies
785
787
  if Hash === dep
786
788
  inputs = assign_dep_inputs({}, dep[:inputs], real_dependencies, dep[:workflow].task_info(dep[:task]))
data/share/Rlib/util.R CHANGED
@@ -477,7 +477,7 @@ rbbt.png_plot <- function(filename, p, width=500, height=500, ...){
477
477
  eval(parse(text=p));
478
478
  }
479
479
 
480
- rbbt.heatmap <- function(filename, data, width=500, height=500, take_log=FALSE, ...){
480
+ rbbt.heatmap <- function(filename, data, width=500, height=500, take_log=FALSE, stdize=TRUE, ...){
481
481
  opar = par()
482
482
  png(filename=filename, width=width, height=height);
483
483
 
@@ -500,7 +500,10 @@ rbbt.heatmap <- function(filename, data, width=500, height=500, take_log=FALSE,
500
500
  }
501
501
 
502
502
  rbbt.require('pls')
503
- data = stdize(data)
503
+
504
+ if (stdize){
505
+ data = stdize(data)
506
+ }
504
507
 
505
508
  heatmap.2(data, scale='column', ...)
506
509
 
@@ -41,7 +41,7 @@ end
41
41
  options[:Port] = options["port"]
42
42
  options[:server] = options["server"]
43
43
  options[:Host] = options["Host"]
44
- options[:Bind = options["Bind"]
44
+ options[:Bind] = options["Bind"]
45
45
 
46
46
  options[:Host] ||= "0.0.0.0"
47
47
  options[:Bind] ||= "0.0.0.0"
@@ -31,7 +31,7 @@ if options[:help]
31
31
  end
32
32
 
33
33
  workflow = ARGV[0]
34
- repo = ARGV[1]
34
+ base_repo = ARGV[1]
35
35
 
36
36
  raise "No workflow specified" if workflow.nil?
37
37
 
@@ -61,8 +61,17 @@ Misc.in_dir(workflow_dir) do
61
61
  end
62
62
  else
63
63
  Log.info "Installing: " + workflow
64
- if repo.nil?
64
+
65
+ if base_repo.nil?
65
66
  repo_base_url = Rbbt.etc.workflow_repo.exists? ? Rbbt.etc.workflow_repo.read.strip : 'https://github.com/Rbbt-Workflows/'
67
+ else
68
+ repo_base_url = base_repo
69
+ end
70
+
71
+
72
+ if repo_base_url.include?(workflow) or repo_base_url.include?(Misc.snake_case(workflow))
73
+ repo = repo_base_url
74
+ else
66
75
  begin
67
76
  repo = File.join(repo_base_url, workflow + '.git')
68
77
  CMD.cmd("wget '#{repo}' -O /dev/null").read
@@ -76,6 +85,7 @@ Misc.in_dir(workflow_dir) do
76
85
  end
77
86
  end
78
87
  end
88
+
79
89
  Log.warn "Cloning #{ repo }"
80
90
  Misc.insist do
81
91
  `git clone "#{repo}" #{ Misc.snake_case(workflow) }`
@@ -13,7 +13,7 @@ Path.setup(workflow_dir) unless Path === workflow_dir
13
13
  workflows = Workflow.installed_workflows
14
14
 
15
15
  if options[:describe]
16
- workflows.each do |workflow|
16
+ workflows.sort.each do |workflow|
17
17
  Workflow.require_workflow workflow
18
18
  workflow = Workflow.workflows.select{|w| Misc.camel_case(w.to_s) == Misc.camel_case(workflow)}.first
19
19
  puts "# "<<[Misc.camel_case(workflow.to_s), workflow.description] * ": "
@@ -24,7 +24,7 @@ if options[:describe]
24
24
 
25
25
  end
26
26
  else
27
- workflows.each do |workflow|
27
+ workflows.sort.each do |workflow|
28
28
  puts Misc.camel_case(workflow.to_s)
29
29
  end
30
30
  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.21.95
4
+ version: 5.21.96
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake