rbbt-dm 1.1.20 → 1.1.21

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: 3ce285713356bad8c3fe55c26a2b3ac42f8c782b
4
- data.tar.gz: ea8d760c4c2682df56a94c4772a53421d3ae89f7
3
+ metadata.gz: 97a83dc56c4d061d7b66f23df60a1126052ead53
4
+ data.tar.gz: fa080e3fdd9d8652d25a1e715908b876ca1ceda5
5
5
  SHA512:
6
- metadata.gz: 15d49776f790c74e40b7c6c8f44ba320d35e66aff8525cff2ad7f375bec87fb1843fd2775128f6d06e64f37b371a727220d35b9ff0ce52e88b2c49ac8a998718
7
- data.tar.gz: 522aa087395221563801e0a2d1a978b2759ad312ba6eea469049b386c44a7198d939f6f05c63aa59dc905b82727384c60e836ad0c4a188377aef7555562a3be2
6
+ metadata.gz: d8bf54beccad1c846d40f1dedb942471ecde6409b2cdd95945dc3b23bcbf0d56ef61c6768b6f926a55b1db8f081db6821250c2569a4c5db398186c3e04e12bf6
7
+ data.tar.gz: 41f7461135afef3182422fc7e68f5c00a6040789ea0bd6b716ce886382ba74228467bf2b6061520a2c1842f0ebfa39faeb5f2b7db626dde13dcbb27436ad6065
@@ -12,7 +12,7 @@ class Matrix
12
12
  name = data_file =~ /:>/ ? File.basename(data_file) : data_file
13
13
  main_samples = main_samples & all_samples
14
14
  contrast_samples = contrast_samples & all_samples
15
- Persist.persist(name, :tsv, :persist => :update, :file => path,
15
+ Persist.persist(name, :tsv, :persist => true, :file => path,
16
16
  :other => {:main => main_samples, :contrast => contrast_samples},
17
17
  :prefix => "Diff", :dir => Matrix.matrix_dir.differential, :no_load => true) do |file|
18
18
 
@@ -107,16 +107,26 @@ module FDR
107
107
  VALUE new_ary = rb_ary_new();
108
108
  VALUE f;
109
109
 
110
- double p, last = 1;
110
+ double p,op, last = 1;
111
111
 
112
112
  for (idx = total - 1; idx >= 0 ; idx-- ){
113
- p = (double) RFLOAT_VALUE(rb_ary_entry(ps, idx));
113
+ op = (double) RFLOAT_VALUE(rb_ary_entry(ps, idx));
114
114
 
115
+ if (op < 0){
116
+ p = -op;
117
+ }else{
118
+ p = op;
119
+ }
115
120
 
116
121
  p = p * (double) total / (double) (idx + 1);
117
122
  if (p > last) p = last;
118
123
  last = p;
119
124
 
125
+ if (op < 0){
126
+ p = -p;
127
+ }else{
128
+ p = p;
129
+ }
120
130
  f = rb_float_new(p);
121
131
  rb_ary_unshift(new_ary, f);
122
132
  }
@@ -157,8 +167,8 @@ module FDR
157
167
  }
158
168
 
159
169
  if RUBY_VERSION[0] == "2"
160
- values = FDR.adjust(values)
161
- keys.zip(values).each do |k,v|
170
+ new_values = FDR.adjust(values)
171
+ keys.zip(new_values).each do |k,v|
162
172
  vs = data[k]
163
173
  if field
164
174
  vs[field] = v
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.20
4
+ version: 1.1.21
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-02-11 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbbt-util