rbbt-util 5.21.90 → 5.21.91
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/tsv/attach.rb +2 -2
- data/lib/rbbt/tsv/attach/util.rb +1 -1
- data/lib/rbbt/tsv/parallel/traverse.rb +2 -2
- data/lib/rbbt/tsv/stream.rb +5 -5
- data/lib/rbbt/util/log/progress/report.rb +11 -2
- data/lib/rbbt/util/misc/omics.rb +1 -1
- data/lib/rbbt/util/misc/pipes.rb +2 -2
- data/lib/rbbt/workflow/step.rb +1 -1
- metadata +64 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f563cccf569fa61510d611058e9bbc3f15f4ecca
|
4
|
+
data.tar.gz: 8d11affe29abde8039c69e64c53206a40584bfd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db6be501c52eefb3e8f7a66a494772462fb26652d3ec17f20215da24958f91d17ae5e7fb648c8dd12770cd500eced281fcd4fdbb174e1f9f86705cfd71f01bfe
|
7
|
+
data.tar.gz: ce353bf4de86ec04797f6cf6b839bb6ee7fb19e4ad67e21d481404d34ea253ab0f79e7d09fc436a3c476be27e9ca33618562f2faa8987acfacb3940f5d1f0c26
|
data/lib/rbbt/tsv/attach.rb
CHANGED
@@ -100,7 +100,7 @@ module TSV
|
|
100
100
|
key1 = key2 = nil
|
101
101
|
while key1.nil?
|
102
102
|
while (line1 = file1.gets) =~ /^#/
|
103
|
-
key_field1, *fields1 = line1.
|
103
|
+
key_field1, *fields1 = line1.chomp.sub('#','').split(sep)
|
104
104
|
end
|
105
105
|
key1, *parts1 = line1.sub("\n",'').split(sep, -1)
|
106
106
|
cols1 = parts1.length
|
@@ -108,7 +108,7 @@ module TSV
|
|
108
108
|
|
109
109
|
while key2.nil?
|
110
110
|
while (line2 = file2.gets) =~ /^#/
|
111
|
-
key_field2, *fields2 = line2.
|
111
|
+
key_field2, *fields2 = line2.chomp.sub('#','').split(sep)
|
112
112
|
end
|
113
113
|
key2, *parts2 = line2.sub("\n",'').split(sep, -1)
|
114
114
|
cols2 = parts2.length
|
data/lib/rbbt/tsv/attach/util.rb
CHANGED
@@ -76,7 +76,7 @@ module TSV
|
|
76
76
|
if type == :double
|
77
77
|
self[key] = values.concat field_positions.collect{|v| []}
|
78
78
|
else
|
79
|
-
self[key] = values.concat [nil] * field_positions
|
79
|
+
self[key] = values.concat [nil] * field_positions.length
|
80
80
|
end
|
81
81
|
when Array === source_keys
|
82
82
|
all_new_values = source_keys.collect do |source_key|
|
@@ -174,7 +174,7 @@ module TSV
|
|
174
174
|
end
|
175
175
|
end
|
176
176
|
begin
|
177
|
-
callback.call yield line.
|
177
|
+
callback.call yield line.chomp
|
178
178
|
ensure
|
179
179
|
bar.tick if bar
|
180
180
|
end
|
@@ -183,7 +183,7 @@ module TSV
|
|
183
183
|
bar.init if bar
|
184
184
|
while line = io.gets
|
185
185
|
begin
|
186
|
-
yield line.
|
186
|
+
yield line.chomp
|
187
187
|
ensure
|
188
188
|
bar.tick if bar
|
189
189
|
end
|
data/lib/rbbt/tsv/stream.rb
CHANGED
@@ -238,12 +238,12 @@ module TSV
|
|
238
238
|
def self.reorder_stream(stream, positions, sep = "\t")
|
239
239
|
Misc.open_pipe do |sin|
|
240
240
|
line = stream.gets
|
241
|
-
line.
|
241
|
+
line.chomp! unless line.nil?
|
242
242
|
|
243
243
|
while line =~ /^#\:/
|
244
244
|
sin.puts line
|
245
245
|
line = stream.gets
|
246
|
-
line.
|
246
|
+
line.chomp! unless line.nil?
|
247
247
|
end
|
248
248
|
|
249
249
|
while line =~ /^#/
|
@@ -255,9 +255,9 @@ module TSV
|
|
255
255
|
end
|
256
256
|
positions = new
|
257
257
|
end
|
258
|
-
sin.puts "#" + line.sub(/^#/,'').
|
258
|
+
sin.puts "#" + line.sub(/^#/,'').chomp.split(sep).values_at(*positions).compact * sep
|
259
259
|
line = stream.gets
|
260
|
-
line.
|
260
|
+
line.chomp! unless line.nil?
|
261
261
|
end
|
262
262
|
|
263
263
|
while line
|
@@ -273,7 +273,7 @@ module TSV
|
|
273
273
|
new_values = values.values_at(*positions)
|
274
274
|
sin.puts new_values * sep
|
275
275
|
line = stream.gets
|
276
|
-
line.
|
276
|
+
line.chomp! unless line.nil?
|
277
277
|
end
|
278
278
|
end
|
279
279
|
end
|
@@ -48,13 +48,22 @@ module Log
|
|
48
48
|
else
|
49
49
|
20
|
50
50
|
end
|
51
|
-
max_history =
|
51
|
+
max_history = 30 if max_history > 30
|
52
52
|
@history.shift if @history.length > max_history
|
53
53
|
end
|
54
54
|
|
55
55
|
@mean_max ||= 0
|
56
56
|
if @history.length > 3
|
57
|
-
|
57
|
+
|
58
|
+
w_mean = 0
|
59
|
+
total_w = 0
|
60
|
+
@history.each_with_index do |v,i|
|
61
|
+
c = i ** 10
|
62
|
+
w_mean += v * c
|
63
|
+
total_w += c
|
64
|
+
end
|
65
|
+
mean = @mean = w_mean.to_f / total_w
|
66
|
+
|
58
67
|
@mean_max = mean if mean > @mean_max
|
59
68
|
end
|
60
69
|
|
data/lib/rbbt/util/misc/omics.rb
CHANGED
data/lib/rbbt/util/misc/pipes.rb
CHANGED
@@ -523,7 +523,7 @@ module Misc
|
|
523
523
|
keys[i] = nil
|
524
524
|
parts[i] = []
|
525
525
|
else
|
526
|
-
key, *p = line.
|
526
|
+
key, *p = line.chomp.split(sep, -1)
|
527
527
|
keys[i] = key
|
528
528
|
parts[i] = p
|
529
529
|
end
|
@@ -542,7 +542,7 @@ module Misc
|
|
542
542
|
keys[i] = nil
|
543
543
|
parts[i] = nil
|
544
544
|
else
|
545
|
-
k, *p = line.
|
545
|
+
k, *p = line.chomp.split(sep, -1)
|
546
546
|
keys[i] = k
|
547
547
|
parts[i] = p
|
548
548
|
end
|
data/lib/rbbt/workflow/step.rb
CHANGED
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.
|
4
|
+
version: 5.21.91
|
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-07-
|
11
|
+
date: 2017-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -508,83 +508,83 @@ signing_key:
|
|
508
508
|
specification_version: 4
|
509
509
|
summary: Utilities for the Ruby Bioinformatics Toolkit (rbbt)
|
510
510
|
test_files:
|
511
|
-
- test/
|
511
|
+
- test/rbbt/test_workflow.rb
|
512
512
|
- test/rbbt/resource/test_path.rb
|
513
|
-
- test/rbbt/association/test_item.rb
|
514
|
-
- test/rbbt/association/test_database.rb
|
515
|
-
- test/rbbt/association/test_open.rb
|
516
|
-
- test/rbbt/association/test_index.rb
|
517
|
-
- test/rbbt/association/test_util.rb
|
518
|
-
- test/rbbt/util/test_concurrency.rb
|
519
|
-
- test/rbbt/util/test_log.rb
|
520
|
-
- test/rbbt/util/test_chain_methods.rb
|
521
|
-
- test/rbbt/util/test_simpleopt.rb
|
522
|
-
- test/rbbt/util/simpleopt/test_parse.rb
|
523
|
-
- test/rbbt/util/simpleopt/test_get.rb
|
524
|
-
- test/rbbt/util/simpleopt/test_setup.rb
|
525
513
|
- test/rbbt/util/test_cmd.rb
|
526
|
-
- test/rbbt/util/
|
527
|
-
- test/rbbt/util/
|
528
|
-
- test/rbbt/util/
|
529
|
-
- test/rbbt/util/
|
530
|
-
- test/rbbt/util/test_tmpfile.rb
|
531
|
-
- test/rbbt/util/test_open.rb
|
532
|
-
- test/rbbt/util/test_filecache.rb
|
533
|
-
- test/rbbt/util/R/test_eval.rb
|
534
|
-
- test/rbbt/util/R/test_model.rb
|
514
|
+
- test/rbbt/util/simpleopt/test_setup.rb
|
515
|
+
- test/rbbt/util/simpleopt/test_get.rb
|
516
|
+
- test/rbbt/util/simpleopt/test_parse.rb
|
517
|
+
- test/rbbt/util/test_chain_methods.rb
|
535
518
|
- test/rbbt/util/test_simpleDSL.rb
|
536
|
-
- test/rbbt/util/
|
537
|
-
- test/rbbt/util/
|
538
|
-
- test/rbbt/util/test_R.rb
|
519
|
+
- test/rbbt/util/test_log.rb
|
520
|
+
- test/rbbt/util/test_open.rb
|
539
521
|
- test/rbbt/util/misc/test_lock.rb
|
540
|
-
- test/rbbt/util/misc/
|
522
|
+
- test/rbbt/util/misc/test_multipart_payload.rb
|
541
523
|
- test/rbbt/util/misc/test_bgzf.rb
|
524
|
+
- test/rbbt/util/misc/test_pipes.rb
|
542
525
|
- test/rbbt/util/misc/test_omics.rb
|
543
|
-
- test/rbbt/util/
|
526
|
+
- test/rbbt/util/test_concurrency.rb
|
527
|
+
- test/rbbt/util/test_R.rb
|
528
|
+
- test/rbbt/util/log/test_progress.rb
|
529
|
+
- test/rbbt/util/test_colorize.rb
|
530
|
+
- test/rbbt/util/test_simpleopt.rb
|
544
531
|
- test/rbbt/util/test_excel2tsv.rb
|
532
|
+
- test/rbbt/util/test_filecache.rb
|
533
|
+
- test/rbbt/util/concurrency/test_processes.rb
|
534
|
+
- test/rbbt/util/concurrency/test_threads.rb
|
535
|
+
- test/rbbt/util/concurrency/processes/test_socket.rb
|
536
|
+
- test/rbbt/util/test_semaphore.rb
|
545
537
|
- test/rbbt/util/test_misc.rb
|
538
|
+
- test/rbbt/util/test_tmpfile.rb
|
539
|
+
- test/rbbt/util/R/test_model.rb
|
540
|
+
- test/rbbt/util/R/test_eval.rb
|
541
|
+
- test/rbbt/test_packed_index.rb
|
542
|
+
- test/rbbt/entity/test_identifiers.rb
|
543
|
+
- test/rbbt/test_association.rb
|
544
|
+
- test/rbbt/knowledge_base/test_traverse.rb
|
545
|
+
- test/rbbt/knowledge_base/test_registry.rb
|
546
|
+
- test/rbbt/knowledge_base/test_entity.rb
|
547
|
+
- test/rbbt/knowledge_base/test_enrichment.rb
|
548
|
+
- test/rbbt/knowledge_base/test_syndicate.rb
|
549
|
+
- test/rbbt/knowledge_base/test_query.rb
|
550
|
+
- test/rbbt/test_resource.rb
|
546
551
|
- test/rbbt/test_entity.rb
|
552
|
+
- test/rbbt/test_knowledge_base.rb
|
553
|
+
- test/rbbt/annotations/test_util.rb
|
554
|
+
- test/rbbt/association/test_index.rb
|
555
|
+
- test/rbbt/association/test_item.rb
|
556
|
+
- test/rbbt/association/test_open.rb
|
557
|
+
- test/rbbt/association/test_util.rb
|
558
|
+
- test/rbbt/association/test_database.rb
|
559
|
+
- test/rbbt/test_tsv.rb
|
547
560
|
- test/rbbt/workflow/step/test_dependencies.rb
|
548
|
-
- test/rbbt/workflow/test_doc.rb
|
549
|
-
- test/rbbt/workflow/test_step.rb
|
550
561
|
- test/rbbt/workflow/test_task.rb
|
551
|
-
- test/rbbt/
|
552
|
-
- test/rbbt/
|
553
|
-
- test/rbbt/
|
554
|
-
- test/rbbt/
|
562
|
+
- test/rbbt/workflow/test_step.rb
|
563
|
+
- test/rbbt/workflow/test_doc.rb
|
564
|
+
- test/rbbt/test_monitor.rb
|
565
|
+
- test/rbbt/test_persist.rb
|
566
|
+
- test/rbbt/test_annotations.rb
|
567
|
+
- test/rbbt/persist/test_tsv.rb
|
568
|
+
- test/rbbt/persist/tsv/test_lmdb.rb
|
569
|
+
- test/rbbt/persist/tsv/test_kyotocabinet.rb
|
570
|
+
- test/rbbt/persist/tsv/test_sharder.rb
|
571
|
+
- test/rbbt/persist/tsv/test_cdb.rb
|
572
|
+
- test/rbbt/persist/tsv/test_tokyocabinet.rb
|
573
|
+
- test/rbbt/persist/tsv/test_leveldb.rb
|
574
|
+
- test/rbbt/tsv/test_field_index.rb
|
555
575
|
- test/rbbt/tsv/test_parallel.rb
|
556
|
-
- test/rbbt/tsv/
|
557
|
-
- test/rbbt/tsv/
|
576
|
+
- test/rbbt/tsv/test_index.rb
|
577
|
+
- test/rbbt/tsv/test_matrix.rb
|
558
578
|
- test/rbbt/tsv/test_change_id.rb
|
579
|
+
- test/rbbt/tsv/test_parser.rb
|
559
580
|
- test/rbbt/tsv/test_stream.rb
|
581
|
+
- test/rbbt/tsv/test_util.rb
|
582
|
+
- test/rbbt/tsv/test_excel.rb
|
583
|
+
- test/rbbt/tsv/test_accessor.rb
|
560
584
|
- test/rbbt/tsv/test_filter.rb
|
561
|
-
- test/rbbt/tsv/test_matrix.rb
|
562
585
|
- test/rbbt/tsv/test_attach.rb
|
563
586
|
- test/rbbt/tsv/test_manipulate.rb
|
564
|
-
- test/rbbt/tsv/
|
565
|
-
- test/rbbt/tsv/
|
566
|
-
- test/rbbt/tsv/test_util.rb
|
567
|
-
- test/rbbt/tsv/test_parser.rb
|
568
|
-
- test/rbbt/test_packed_index.rb
|
569
|
-
- test/rbbt/test_persist.rb
|
587
|
+
- test/rbbt/tsv/parallel/test_through.rb
|
588
|
+
- test/rbbt/tsv/parallel/test_traverse.rb
|
570
589
|
- test/rbbt/test_fix_width_table.rb
|
571
|
-
- test/
|
572
|
-
- test/rbbt/knowledge_base/test_entity.rb
|
573
|
-
- test/rbbt/knowledge_base/test_query.rb
|
574
|
-
- test/rbbt/knowledge_base/test_enrichment.rb
|
575
|
-
- test/rbbt/knowledge_base/test_syndicate.rb
|
576
|
-
- test/rbbt/knowledge_base/test_registry.rb
|
577
|
-
- test/rbbt/entity/test_identifiers.rb
|
578
|
-
- test/rbbt/test_monitor.rb
|
579
|
-
- test/rbbt/test_workflow.rb
|
580
|
-
- test/rbbt/test_annotations.rb
|
581
|
-
- test/rbbt/annotations/test_util.rb
|
582
|
-
- test/rbbt/test_resource.rb
|
583
|
-
- test/rbbt/persist/tsv/test_tokyocabinet.rb
|
584
|
-
- test/rbbt/persist/tsv/test_kyotocabinet.rb
|
585
|
-
- test/rbbt/persist/tsv/test_lmdb.rb
|
586
|
-
- test/rbbt/persist/tsv/test_leveldb.rb
|
587
|
-
- test/rbbt/persist/tsv/test_cdb.rb
|
588
|
-
- test/rbbt/persist/tsv/test_sharder.rb
|
589
|
-
- test/rbbt/persist/test_tsv.rb
|
590
|
-
- test/rbbt/test_tsv.rb
|
590
|
+
- test/test_helper.rb
|