rbbt-dm 1.1.20 → 1.1.21
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/matrix/differential.rb +1 -1
- data/lib/rbbt/statistics/fdr.rb +14 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97a83dc56c4d061d7b66f23df60a1126052ead53
|
4
|
+
data.tar.gz: fa080e3fdd9d8652d25a1e715908b876ca1ceda5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =>
|
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
|
|
data/lib/rbbt/statistics/fdr.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
161
|
-
keys.zip(
|
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.
|
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-
|
11
|
+
date: 2016-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|