rbbt-util 5.23.24 → 5.23.25

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: 8d51c26a41d1234eec3ba11ccbe095c1a1d414df
4
- data.tar.gz: 2d540336dedf30e7e6c421255225d2963b907303
3
+ metadata.gz: 625721aa410028657ae453a55d77e57782e3d7c5
4
+ data.tar.gz: 30a323d757baade804120a648538a5f7669aa053
5
5
  SHA512:
6
- metadata.gz: e93235dd166bef8a2648ffddb161808630022396a7d0555d11a1d079899a3034e3c0a74db25e9cb48af0290cbaa9d206431b3c82e8743add5b196471773cc693
7
- data.tar.gz: 7015cb56c57717aa854c84d35ffdcba3a4448f40990fb42909b708b9281e23d7d3ceed9d6d8812204064d0cfc6bc32cfcb329d392013d734b45f5cec3634eec5
6
+ metadata.gz: 3e6ca02574ebf885b77e0d380dfdc84be134fa651f11fe13e011b36b06e944e7d6bcb1ee15338a287096835cb84f2ee9b9f41f594c4b975013888552638f20b2
7
+ data.tar.gz: f605dff38ff692d99d438a1082071abbb890a209ffb27cf51f9e9c40e1a431aa2a17f3759dc4cebe723af8d047d4cc4d79304927c06cecf2845404467e8590f5
data/lib/rbbt/util/cmd.rb CHANGED
@@ -189,6 +189,7 @@ module CMD
189
189
  end
190
190
  end
191
191
  io.join
192
+
192
193
  nil
193
194
  end
194
195
  end
@@ -84,7 +84,7 @@ module Misc
84
84
  tokens[nil] = tokens[default]
85
85
  tokens[""] = tokens[default]
86
86
  time = 0
87
- str.scan(/(\d+)(\w?)/).each do |amount, measure|
87
+ str.scan(/(\d+)(\w*)/).each do |amount, measure|
88
88
  time += amount.to_i * tokens[measure]
89
89
  end
90
90
  time
@@ -7,7 +7,7 @@ module AbortedStream
7
7
  end
8
8
 
9
9
  module ConcurrentStream
10
- attr_accessor :threads, :pids, :callback, :abort_callback, :filename, :joined, :aborted, :autojoin, :lockfile, :no_fail, :pair, :thread
10
+ attr_accessor :threads, :pids, :callback, :abort_callback, :filename, :joined, :aborted, :autojoin, :lockfile, :no_fail, :pair, :thread, :stream_exception
11
11
 
12
12
  def self.setup(stream, options = {}, &block)
13
13
 
@@ -125,6 +125,7 @@ module ConcurrentStream
125
125
  ensure
126
126
  @joined = true
127
127
  lockfile.unlock if lockfile and lockfile.locked?
128
+ raise stream_exception if stream_exception
128
129
  end
129
130
  end
130
131
 
@@ -224,6 +225,7 @@ module ConcurrentStream
224
225
  threads.each do |thread|
225
226
  thread.raise exception
226
227
  end
228
+ self.stream_exception = exception
227
229
 
228
230
  self.abort
229
231
  end
@@ -270,7 +270,7 @@ module Misc
270
270
  obj + " (file missing)"
271
271
  end
272
272
  when String
273
- if Misc.is_filename?(obj)
273
+ if Misc.is_filename?(obj)
274
274
  obj2str Path.setup(obj.dup)
275
275
  else
276
276
  obj = obj.chomp if String === obj
@@ -428,9 +428,6 @@ eum fugiat quo voluptas nulla pariatur?"
428
428
  assert_equal [737407, ["-----", "-----G", "-----GTTAAT"]], Misc.correct_vcf_mutation(737406, "GTTAAT", "G,GG,GGTTAAT")
429
429
  end
430
430
 
431
- def test_mutation_to_ensembl_format
432
- assert_equal Misc.mutation_to_ensembl_format("1:100:T", "A"), %w(1 100 100 A/T)
433
- end
434
431
 
435
432
  def test_fingerprint
436
433
  assert_equal '{:a=>1}', Misc.fingerprint({:a => 1})
@@ -487,9 +484,11 @@ eum fugiat quo voluptas nulla pariatur?"
487
484
 
488
485
  def test_obj2md5
489
486
  str = "string" * 1000000
490
- obj1 = [1,2,"test", 0.3, [1,2,3], {:a => [1,2], :b => str}]
491
- obj2 = [1,2,"test", 0.3, [1,2,3], {:a => [1,2,3], :b => str}]
492
- obj3 = [1,2,:test, 0.3, [1,2,3], {:a => [1,2,"3"], :b => str}]
487
+ obj1 = [1,2,"test_str", 0.3, [1,2,3], {:a => [1,2], :b => str}]
488
+
489
+ obj2 = [1,2,"test_str", 0.3, [1,2,3], {:a => [1,2,3], :b => str}]
490
+ obj3 = [1,2,:test_str, 0.3, [1,2,3], {:a => [1,2,"3"], :b => str}]
491
+
493
492
  assert_not_equal Misc.obj2md5(obj1), Misc.obj2md5(obj2)
494
493
  assert_equal Misc.obj2md5(obj2), Misc.obj2md5(obj3)
495
494
  hash = Hash[*(0..obj1.length).zip(obj1).flatten]
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.23.24
4
+ version: 5.23.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2018-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake