rbbt-util 5.21.58 → 5.21.59

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: 9b375c4361c5b6987890bb7ea80c0da7263d4fef
4
- data.tar.gz: 062604ecae4d86c8b4227e7e2456c976d85a3114
3
+ metadata.gz: 6af6b7d19c8318dff73f410c5e4094aeaa9466d7
4
+ data.tar.gz: cb78b1b85697ca27eb8716afe3b70513c4ffbe41
5
5
  SHA512:
6
- metadata.gz: f7dc352c8f19f5183342b9785712c9231e7f12976290435675f247544ad0194a199d49913beedc9889994620022b250cd0df18be2136d225dee99c79c09aa6b2
7
- data.tar.gz: c6956c9de0dac01573c563822b8d17796414e2cc4935b87839a9cfa82dde09bd2cc4024156ce2ea65324e20e2213d038d74c088e19732f3cf0a037c2d487d84e
6
+ metadata.gz: 46bf19741a3c8d36219cd75fef3a103cad844dd89d4534ea8af5ec3c01fbc1d3632d07c55a1a397d5737550ad5d85961804af7ef3df19f1dee0e7ea777f4175b
7
+ data.tar.gz: 89ada9ba0db87dd8a2b10a2848e2d3f92c6bd2b0935177a1b50606604f7bee2a87667d6a02266842505965e79c4c3dac839a6b26bfd97eb9e1a6c21a0e02283d
@@ -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).any?)
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).any?)
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}.any?)
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)}.any?)
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
@@ -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
- label << "|#{name3}: #{sizes[2]} (#{name1}: #{sizes[4]}, #{name2}: #{sizes[5]})"
83
- if total
84
- label << "| INTERSECTION: #{sizes[6]} TOTAL: #{total}"
85
- else
86
- label << "| INTERSECTION: #{sizes[6]}"
87
- end
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.any? or dependencies.any?
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.58
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-30 00:00:00.000000000 Z
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/rbbt/test_workflow.rb
494
+ - test/test_helper.rb
495
495
  - test/rbbt/resource/test_path.rb
496
- - test/rbbt/util/test_cmd.rb
497
- - test/rbbt/util/simpleopt/test_setup.rb
498
- - test/rbbt/util/simpleopt/test_get.rb
499
- - test/rbbt/util/simpleopt/test_parse.rb
500
- - test/rbbt/util/test_chain_methods.rb
501
- - test/rbbt/util/test_simpleDSL.rb
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/test_concurrency.rb
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/test_monitor.rb
548
- - test/rbbt/test_persist.rb
549
- - test/rbbt/test_annotations.rb
550
- - test/rbbt/persist/test_tsv.rb
551
- - test/rbbt/persist/tsv/test_lmdb.rb
552
- - test/rbbt/persist/tsv/test_kyotocabinet.rb
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/parallel/test_through.rb
571
- - test/rbbt/tsv/parallel/test_traverse.rb
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/test_helper.rb
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