rbbt-util 5.21.58 → 5.21.59
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/manipulate.rb +4 -4
- data/lib/rbbt/util/misc/math.rb +13 -6
- data/lib/rbbt/workflow/accessor.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: 6af6b7d19c8318dff73f410c5e4094aeaa9466d7
|
4
|
+
data.tar.gz: cb78b1b85697ca27eb8716afe3b70513c4ffbe41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46bf19741a3c8d36219cd75fef3a103cad844dd89d4534ea8af5ec3c01fbc1d3632d07c55a1a397d5737550ad5d85961804af7ef3df19f1dee0e7ea777f4175b
|
7
|
+
data.tar.gz: 89ada9ba0db87dd8a2b10a2848e2d3f92c6bd2b0935177a1b50606604f7bee2a87667d6a02266842505965e79c4c3dac839a6b26bfd97eb9e1a6c21a0e02283d
|
data/lib/rbbt/tsv/manipulate.rb
CHANGED
@@ -379,11 +379,11 @@ module TSV
|
|
379
379
|
end
|
380
380
|
when :list, :flat
|
381
381
|
through do |key, values|
|
382
|
-
new[key] = values if invert ^ (method.include? key or (method & values).
|
382
|
+
new[key] = values if invert ^ (method.include? key or (method & values).length > 0)
|
383
383
|
end
|
384
384
|
else
|
385
385
|
through do |key, values|
|
386
|
-
new[key] = values if invert ^ (method.include? key or (method & values.flatten).
|
386
|
+
new[key] = values if invert ^ (method.include? key or (method & values.flatten).length > 0)
|
387
387
|
end
|
388
388
|
end
|
389
389
|
end
|
@@ -517,7 +517,7 @@ module TSV
|
|
517
517
|
with_unnamed do
|
518
518
|
through :key, key do |key, values|
|
519
519
|
values = [values] if type == :single
|
520
|
-
new[key] = self[key] if invert ^ (values.flatten.select{|v| v == method}.
|
520
|
+
new[key] = self[key] if invert ^ (values.flatten.select{|v| v == method}.length > 0)
|
521
521
|
end
|
522
522
|
end
|
523
523
|
|
@@ -531,7 +531,7 @@ module TSV
|
|
531
531
|
with_unnamed do
|
532
532
|
through :key, key do |key, values|
|
533
533
|
values = [values] if type == :single
|
534
|
-
new[key] = self[key] if invert ^ (values.flatten.select{|v| method.call(v)}.
|
534
|
+
new[key] = self[key] if invert ^ (values.flatten.select{|v| method.call(v)}.length > 0)
|
535
535
|
end
|
536
536
|
end
|
537
537
|
end
|
data/lib/rbbt/util/misc/math.rb
CHANGED
@@ -23,6 +23,13 @@ module Misc
|
|
23
23
|
sum(list) / list.compact.length
|
24
24
|
end
|
25
25
|
|
26
|
+
def self.median(array)
|
27
|
+
sorted = array.sort
|
28
|
+
len = sorted.length
|
29
|
+
(sorted[(len - 1) / 2] + sorted[len / 2]) / 2.0
|
30
|
+
end
|
31
|
+
|
32
|
+
|
26
33
|
def self.sd(list)
|
27
34
|
return nil if list.length < 3
|
28
35
|
mean = mean(list)
|
@@ -79,12 +86,12 @@ module Misc
|
|
79
86
|
|
80
87
|
label = "#{name1}: #{sizes[0]} (#{name2}: #{sizes[3]}, #{name3}: #{sizes[4]})"
|
81
88
|
label << "|#{name2}: #{sizes[1]} (#{name1}: #{sizes[3]}, #{name3}: #{sizes[5]})"
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
89
|
+
label << "|#{name3}: #{sizes[2]} (#{name1}: #{sizes[4]}, #{name2}: #{sizes[5]})"
|
90
|
+
if total
|
91
|
+
label << "| INTERSECTION: #{sizes[6]} TOTAL: #{total}"
|
92
|
+
else
|
93
|
+
label << "| INTERSECTION: #{sizes[6]}"
|
94
|
+
end
|
88
95
|
|
89
96
|
max = total || sizes.max
|
90
97
|
sizes = sizes.collect{|v| (v.to_f/max * 100).to_i.to_f / 100}
|
@@ -772,7 +772,7 @@ module Workflow
|
|
772
772
|
def step_path(taskname, jobname, inputs, dependencies, extension = nil)
|
773
773
|
#Proc.new{
|
774
774
|
raise "Jobname makes an invalid path: #{ jobname }" if jobname =~ /\.\./
|
775
|
-
if inputs.
|
775
|
+
if inputs.length > 0 or dependencies.any?
|
776
776
|
tagged_jobname = case TAG
|
777
777
|
when :hash
|
778
778
|
hash_str = Misc.obj2digest({:inputs => inputs, :dependencies => dependencies})
|
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.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -491,83 +491,83 @@ signing_key:
|
|
491
491
|
specification_version: 4
|
492
492
|
summary: Utilities for the Ruby Bioinformatics Toolkit (rbbt)
|
493
493
|
test_files:
|
494
|
-
- test/
|
494
|
+
- test/test_helper.rb
|
495
495
|
- test/rbbt/resource/test_path.rb
|
496
|
-
- test/rbbt/
|
497
|
-
- test/rbbt/
|
498
|
-
- test/rbbt/
|
499
|
-
- test/rbbt/
|
500
|
-
- test/rbbt/
|
501
|
-
- test/rbbt/util/
|
496
|
+
- test/rbbt/association/test_item.rb
|
497
|
+
- test/rbbt/association/test_database.rb
|
498
|
+
- test/rbbt/association/test_open.rb
|
499
|
+
- test/rbbt/association/test_index.rb
|
500
|
+
- test/rbbt/association/test_util.rb
|
501
|
+
- test/rbbt/util/test_concurrency.rb
|
502
502
|
- test/rbbt/util/test_log.rb
|
503
|
+
- test/rbbt/util/test_chain_methods.rb
|
504
|
+
- test/rbbt/util/test_simpleopt.rb
|
505
|
+
- test/rbbt/util/simpleopt/test_parse.rb
|
506
|
+
- test/rbbt/util/simpleopt/test_get.rb
|
507
|
+
- test/rbbt/util/simpleopt/test_setup.rb
|
508
|
+
- test/rbbt/util/test_cmd.rb
|
509
|
+
- test/rbbt/util/test_semaphore.rb
|
510
|
+
- test/rbbt/util/concurrency/test_threads.rb
|
511
|
+
- test/rbbt/util/concurrency/processes/test_socket.rb
|
512
|
+
- test/rbbt/util/concurrency/test_processes.rb
|
513
|
+
- test/rbbt/util/test_tmpfile.rb
|
503
514
|
- test/rbbt/util/test_open.rb
|
515
|
+
- test/rbbt/util/test_filecache.rb
|
516
|
+
- test/rbbt/util/R/test_eval.rb
|
517
|
+
- test/rbbt/util/R/test_model.rb
|
518
|
+
- test/rbbt/util/test_simpleDSL.rb
|
519
|
+
- test/rbbt/util/log/test_progress.rb
|
520
|
+
- test/rbbt/util/test_colorize.rb
|
521
|
+
- test/rbbt/util/test_R.rb
|
504
522
|
- test/rbbt/util/misc/test_lock.rb
|
505
|
-
- test/rbbt/util/misc/test_multipart_payload.rb
|
506
|
-
- test/rbbt/util/misc/test_bgzf.rb
|
507
523
|
- test/rbbt/util/misc/test_pipes.rb
|
524
|
+
- test/rbbt/util/misc/test_bgzf.rb
|
508
525
|
- test/rbbt/util/misc/test_omics.rb
|
509
|
-
- test/rbbt/util/
|
510
|
-
- test/rbbt/util/test_R.rb
|
511
|
-
- test/rbbt/util/log/test_progress.rb
|
512
|
-
- test/rbbt/util/test_colorize.rb
|
513
|
-
- test/rbbt/util/test_simpleopt.rb
|
526
|
+
- test/rbbt/util/misc/test_multipart_payload.rb
|
514
527
|
- test/rbbt/util/test_excel2tsv.rb
|
515
|
-
- test/rbbt/util/test_filecache.rb
|
516
|
-
- test/rbbt/util/concurrency/test_processes.rb
|
517
|
-
- test/rbbt/util/concurrency/test_threads.rb
|
518
|
-
- test/rbbt/util/concurrency/processes/test_socket.rb
|
519
|
-
- test/rbbt/util/test_semaphore.rb
|
520
528
|
- test/rbbt/util/test_misc.rb
|
521
|
-
- test/rbbt/util/test_tmpfile.rb
|
522
|
-
- test/rbbt/util/R/test_model.rb
|
523
|
-
- test/rbbt/util/R/test_eval.rb
|
524
|
-
- test/rbbt/test_packed_index.rb
|
525
|
-
- test/rbbt/entity/test_identifiers.rb
|
526
|
-
- test/rbbt/test_association.rb
|
527
|
-
- test/rbbt/knowledge_base/test_traverse.rb
|
528
|
-
- test/rbbt/knowledge_base/test_registry.rb
|
529
|
-
- test/rbbt/knowledge_base/test_entity.rb
|
530
|
-
- test/rbbt/knowledge_base/test_enrichment.rb
|
531
|
-
- test/rbbt/knowledge_base/test_syndicate.rb
|
532
|
-
- test/rbbt/knowledge_base/test_query.rb
|
533
|
-
- test/rbbt/test_resource.rb
|
534
529
|
- test/rbbt/test_entity.rb
|
535
|
-
- test/rbbt/test_knowledge_base.rb
|
536
|
-
- test/rbbt/annotations/test_util.rb
|
537
|
-
- test/rbbt/association/test_index.rb
|
538
|
-
- test/rbbt/association/test_item.rb
|
539
|
-
- test/rbbt/association/test_open.rb
|
540
|
-
- test/rbbt/association/test_util.rb
|
541
|
-
- test/rbbt/association/test_database.rb
|
542
|
-
- test/rbbt/test_tsv.rb
|
543
530
|
- test/rbbt/workflow/step/test_dependencies.rb
|
544
|
-
- test/rbbt/workflow/test_task.rb
|
545
|
-
- test/rbbt/workflow/test_step.rb
|
546
531
|
- test/rbbt/workflow/test_doc.rb
|
547
|
-
- test/rbbt/
|
548
|
-
- test/rbbt/
|
549
|
-
- test/rbbt/
|
550
|
-
- test/rbbt/
|
551
|
-
- test/rbbt/
|
552
|
-
- test/rbbt/
|
553
|
-
- test/rbbt/persist/tsv/test_sharder.rb
|
554
|
-
- test/rbbt/persist/tsv/test_cdb.rb
|
555
|
-
- test/rbbt/persist/tsv/test_tokyocabinet.rb
|
556
|
-
- test/rbbt/persist/tsv/test_leveldb.rb
|
557
|
-
- test/rbbt/tsv/test_field_index.rb
|
532
|
+
- test/rbbt/workflow/test_step.rb
|
533
|
+
- test/rbbt/workflow/test_task.rb
|
534
|
+
- test/rbbt/test_association.rb
|
535
|
+
- test/rbbt/test_knowledge_base.rb
|
536
|
+
- test/rbbt/tsv/parallel/test_traverse.rb
|
537
|
+
- test/rbbt/tsv/parallel/test_through.rb
|
558
538
|
- test/rbbt/tsv/test_parallel.rb
|
559
|
-
- test/rbbt/tsv/test_index.rb
|
560
|
-
- test/rbbt/tsv/test_matrix.rb
|
561
|
-
- test/rbbt/tsv/test_change_id.rb
|
562
|
-
- test/rbbt/tsv/test_parser.rb
|
563
|
-
- test/rbbt/tsv/test_stream.rb
|
564
|
-
- test/rbbt/tsv/test_util.rb
|
565
539
|
- test/rbbt/tsv/test_excel.rb
|
566
540
|
- test/rbbt/tsv/test_accessor.rb
|
541
|
+
- test/rbbt/tsv/test_change_id.rb
|
542
|
+
- test/rbbt/tsv/test_stream.rb
|
567
543
|
- test/rbbt/tsv/test_filter.rb
|
544
|
+
- test/rbbt/tsv/test_matrix.rb
|
568
545
|
- test/rbbt/tsv/test_attach.rb
|
569
546
|
- test/rbbt/tsv/test_manipulate.rb
|
570
|
-
- test/rbbt/tsv/
|
571
|
-
- test/rbbt/tsv/
|
547
|
+
- test/rbbt/tsv/test_field_index.rb
|
548
|
+
- test/rbbt/tsv/test_index.rb
|
549
|
+
- test/rbbt/tsv/test_util.rb
|
550
|
+
- test/rbbt/tsv/test_parser.rb
|
551
|
+
- test/rbbt/test_packed_index.rb
|
552
|
+
- test/rbbt/test_persist.rb
|
572
553
|
- test/rbbt/test_fix_width_table.rb
|
573
|
-
- test/
|
554
|
+
- test/rbbt/knowledge_base/test_traverse.rb
|
555
|
+
- test/rbbt/knowledge_base/test_entity.rb
|
556
|
+
- test/rbbt/knowledge_base/test_query.rb
|
557
|
+
- test/rbbt/knowledge_base/test_enrichment.rb
|
558
|
+
- test/rbbt/knowledge_base/test_syndicate.rb
|
559
|
+
- test/rbbt/knowledge_base/test_registry.rb
|
560
|
+
- test/rbbt/entity/test_identifiers.rb
|
561
|
+
- test/rbbt/test_monitor.rb
|
562
|
+
- test/rbbt/test_workflow.rb
|
563
|
+
- test/rbbt/test_annotations.rb
|
564
|
+
- test/rbbt/annotations/test_util.rb
|
565
|
+
- test/rbbt/test_resource.rb
|
566
|
+
- test/rbbt/persist/tsv/test_tokyocabinet.rb
|
567
|
+
- test/rbbt/persist/tsv/test_kyotocabinet.rb
|
568
|
+
- test/rbbt/persist/tsv/test_lmdb.rb
|
569
|
+
- test/rbbt/persist/tsv/test_leveldb.rb
|
570
|
+
- test/rbbt/persist/tsv/test_cdb.rb
|
571
|
+
- test/rbbt/persist/tsv/test_sharder.rb
|
572
|
+
- test/rbbt/persist/test_tsv.rb
|
573
|
+
- test/rbbt/test_tsv.rb
|