rbbt-dm 1.1.32 → 1.1.33

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: deadbdfb45542ae8375db4a2b52516cf5728785c
4
- data.tar.gz: 49014bd2bec155f0da799f3d05e62bdab7a1b198
3
+ metadata.gz: 4cd0ada9a3ede35888a4ec1e581777fc4b51756b
4
+ data.tar.gz: 156f7b9dfe076a13aa93cfca9fa09fae93ced6a6
5
5
  SHA512:
6
- metadata.gz: 0cfbd52d544f3406be0def80cc123096882fcfbe0a6567c52b5e079636ec430b86b6a73e469277f476078164839c1d92d923cf87446f6b3fb7851be84fde2e5b
7
- data.tar.gz: 5d0ce905dcaa74ceb1077459a6edf7b530aef94c02cbde90805824a7dc5b4cc33d5f54400d6191386e3d00d2fe1f7177c091d4ae2770f5784c79a2a7e55ea162
6
+ metadata.gz: c1a2905af47b7259202f58f80303b3298f0628b0ec22c5458c0a15707e5dee12cab7685b9e070704d6e053c2a2e34f51fb7e6965ef516b6fc0a9c5e3c8763972
7
+ data.tar.gz: 2427ce9f476d56d9fce2452e98e56d81177b56f832378483a5e0fc0fbdddf668b8cd5289b9fe7a2b4bfb85e8ce11a6352386b8b1d7b17d726a7ca47803fbcae4
@@ -155,8 +155,13 @@ module FDR
155
155
 
156
156
  values = []
157
157
  keys = []
158
+
159
+ field_pos = (field === String) ? data.fields.index(field) : field
160
+
161
+ field_pos = 0 if field_pos.nil? and tsv.type != :single
162
+
158
163
  data.collect{|k,vs|
159
- v = field.nil? ? vs : vs[field]
164
+ v = field_pos.nil? ? vs : vs[field_pos]
160
165
  v = v.first if Array === v
161
166
  [k, v.to_f]
162
167
  }.sort{|a,b|
@@ -171,7 +176,7 @@ module FDR
171
176
  keys.zip(new_values).each do |k,v|
172
177
  vs = data[k]
173
178
  if field
174
- vs[field] = v
179
+ vs[field_pos] = v
175
180
  else
176
181
  if Array === vs
177
182
  vs[0] = v
@@ -34,7 +34,6 @@ class TestFDR < Test::Unit::TestCase
34
34
 
35
35
  assert_equal(clean(@r_adj), clean(FDR.adjust_fast_self(copy(@values)))) if RUBY_VERSION[0] != "2"
36
36
  end
37
-
38
37
  end
39
38
 
40
39
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-dm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.32
4
+ version: 1.1.33
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-02-07 00:00:00.000000000 Z
11
+ date: 2017-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbbt-util