rbbt-dm 1.1.17 → 1.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/matrix/differential.rb +8 -2
- data/lib/rbbt/matrix.rb +8 -1
- data/lib/rbbt/statistics/random_walk.rb +8 -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: ba8688bb3e7913ef167e240940388ab69fa33e5c
|
4
|
+
data.tar.gz: 40f43f13ce557e8ae994e651cd11ab7e054ae3b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ed0a89e1c2d6a449b86c68536c1a55626f7a7f074714f227d8a862d1974096a40027041c254482fce4edecdd53f2518da72ce29e0ac4f106934f629fb8e29fe
|
7
|
+
data.tar.gz: e26cd0ce1e3ab61b2774f89f7a0c83ae63d440b4016abcb6118421a56126a21ef5f40fd1fcf3846aaa128fe508d4cffb8c89edd426affac0d36ab1002642f174
|
@@ -31,12 +31,18 @@ class Matrix
|
|
31
31
|
log2 = true
|
32
32
|
trend = true
|
33
33
|
two_channel = false
|
34
|
-
|
34
|
+
when 'log2 ratio', 'transformed count'
|
35
35
|
log2 = false
|
36
|
-
trend =
|
36
|
+
trend = false
|
37
|
+
two_channel = false
|
38
|
+
else
|
39
|
+
Log.warn "Unkown value_type: #{value_type}"
|
40
|
+
log2 = true
|
41
|
+
trend = false
|
37
42
|
two_channel = false
|
38
43
|
end
|
39
44
|
|
45
|
+
file = file.find if Path === file
|
40
46
|
FileUtils.mkdir_p File.dirname(file) unless file.nil? or File.exists? File.dirname(file)
|
41
47
|
|
42
48
|
cmd = <<-EOS
|
data/lib/rbbt/matrix.rb
CHANGED
@@ -33,6 +33,10 @@ class Matrix
|
|
33
33
|
@samples ||= TSV.parse_header(@data_file).fields
|
34
34
|
end
|
35
35
|
|
36
|
+
def subsets=(subsets)
|
37
|
+
@subsets = subsets
|
38
|
+
end
|
39
|
+
|
36
40
|
def subsets
|
37
41
|
@subsets ||= begin
|
38
42
|
subsets = {}
|
@@ -138,6 +142,9 @@ class Matrix
|
|
138
142
|
Misc.mean(v.compact)
|
139
143
|
end
|
140
144
|
end
|
141
|
-
|
145
|
+
subsets = self.subsets
|
146
|
+
matrix = Matrix.new file, labels, value_type, "Ensembl Gene ID", organism
|
147
|
+
matrix.subsets = subsets
|
148
|
+
matrix
|
142
149
|
end
|
143
150
|
end
|
@@ -276,16 +276,20 @@ module RandomWalk
|
|
276
276
|
end
|
277
277
|
end
|
278
278
|
|
279
|
-
def self.
|
280
|
-
|
281
|
-
|
279
|
+
def self.persisted_permutations(size, total, missing = 0, times = 10_000)
|
280
|
+
require 'rbbt/util/tc_cache'
|
281
|
+
repo_file = "/tmp/rw_repo9"
|
282
|
+
key = Misc.digest([size, total, missing, times, scoring_method].inspect)
|
283
|
+
cache = TCCache.open(repo_file, :float_array)
|
284
|
+
p = cache.cache(key) do
|
285
|
+
permutations(size, total, missing, times)
|
282
286
|
end
|
287
|
+
p
|
283
288
|
end
|
284
289
|
|
285
290
|
def self.pvalue(permutations, score)
|
286
291
|
score = score.abs
|
287
292
|
permutations.inject(1){|acc, per|
|
288
|
-
|
289
293
|
acc += 1 if per > score
|
290
294
|
acc
|
291
295
|
}.to_f / permutations.length
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|