rbbt-dm 1.1.29 → 1.1.30
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.rb +1 -1
- data/share/R/barcode.R +5 -4
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e20a7775a22a2528277f4f1b6fc70a365ebb7f0f
|
4
|
+
data.tar.gz: 9b421a68b8c47d29e71d0ee502e848b13f617329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e6683da12ca35ca6e28f3581423d4641c369556b6db34065370856e1db0814deb1e5c747acd4b22c1e032be42809b2d829cb2e52b323fb24adb5616423d04f2
|
7
|
+
data.tar.gz: 49e2fc06719b2838cfbf041f8897abf34adc3451e0201595b7152ecb2afb5b6293fb955067b388324a94c727e77f35deb8a0630e7536a309aeccad66e55472ec
|
data/lib/rbbt/matrix.rb
CHANGED
@@ -166,7 +166,7 @@ class Matrix
|
|
166
166
|
name = data_file =~ /:>/ ? File.basename(data_file) : data_file
|
167
167
|
|
168
168
|
file = Persist.persist(data_file, :tsv, :prefix => "Barcode R #{factor}", :dir => Matrix.matrix_dir.barcode, :no_load => true) do |filename|
|
169
|
-
barcode(filename, factor)
|
169
|
+
barcode(filename, factor)
|
170
170
|
end
|
171
171
|
subsets = self.subsets
|
172
172
|
matrix = Matrix.new file, labels, value_type, "Ensembl Gene ID", organism
|
data/share/R/barcode.R
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
rbbt.GE.barcode <- function(matrix_file, output_file, sd.factor = 2, key.field = "Ensembl Gene ID"){
|
2
|
-
data = rbbt.tsv(matrix_file)
|
2
|
+
data = rbbt.tsv.numeric(matrix_file)
|
3
|
+
|
3
4
|
data.mean = rowMeans(data, na.rm=T)
|
4
5
|
data.sd = apply(data, 1, sd, na.rm=T)
|
5
6
|
data.threshold = as.matrix(data.mean) + sd.factor * as.matrix(data.sd)
|
@@ -27,8 +28,7 @@ rbbt.GE.barcode <- function(matrix_file, output_file, sd.factor = 2, key.field =
|
|
27
28
|
}
|
28
29
|
|
29
30
|
rbbt.GE.barcode.mode <- function(matrix_file, output_file, sd.factor = 2, key.field = "Ensembl Gene ID"){
|
30
|
-
data = rbbt.tsv(matrix_file)
|
31
|
-
data.mean = rowMeans(data, na.rm=T)
|
31
|
+
data = rbbt.tsv.numeric(matrix_file)
|
32
32
|
|
33
33
|
data.mode = apply(data, 1, function(x){ mode = rbbt.get.modes(x)$modes[1]; lower = x[x <= mode]; return(c(lower, mode, lower+mode));})
|
34
34
|
data.empty = sapply(data.mode,function(x){ length(x) < 3})
|
@@ -67,7 +67,8 @@ rbbt.GE.activity_cluster <- function(matrix_file, output_file, key.field = "ID")
|
|
67
67
|
|
68
68
|
library(mclust)
|
69
69
|
|
70
|
-
data = rbbt.tsv(matrix_file)
|
70
|
+
data = rbbt.tsv.numeric(matrix_file)
|
71
|
+
|
71
72
|
classes = apply(data,2,function(row){Mclust(row)$classification})
|
72
73
|
|
73
74
|
rownames(classes) <- rownames(data)
|
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.30
|
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-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|
@@ -141,12 +141,12 @@ signing_key:
|
|
141
141
|
specification_version: 4
|
142
142
|
summary: Data-mining and statistics
|
143
143
|
test_files:
|
144
|
-
- test/test_helper.rb
|
145
|
-
- test/rbbt/vector/model/test_svm.rb
|
146
|
-
- test/rbbt/vector/test_model.rb
|
147
144
|
- test/rbbt/network/test_paths.rb
|
148
|
-
- test/rbbt/matrix/test_barcode.rb
|
149
|
-
- test/rbbt/statistics/test_random_walk.rb
|
150
145
|
- test/rbbt/statistics/test_fdr.rb
|
151
|
-
- test/rbbt/statistics/
|
146
|
+
- test/rbbt/statistics/test_random_walk.rb
|
152
147
|
- test/rbbt/statistics/test_fisher.rb
|
148
|
+
- test/rbbt/statistics/test_hypergeometric.rb
|
149
|
+
- test/rbbt/vector/model/test_svm.rb
|
150
|
+
- test/rbbt/vector/test_model.rb
|
151
|
+
- test/rbbt/matrix/test_barcode.rb
|
152
|
+
- test/test_helper.rb
|