rbbt-dm 1.1.23 → 1.1.24
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 +10 -0
- data/lib/rbbt/statistics/rank_product.rb +1 -1
- data/share/R/MA.R +5 -1
- 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: 6d11d8ef4665bf67cfb366e8d4d09cf4c15ab071
|
4
|
+
data.tar.gz: 0fcbe23b5740ff83c7f82982720e836628bd0634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff7cd428d4e85a6e52f84343932e42dbab7621cd6197d38a0166e90e3bbd791877a436122970d12d884158edccda287e5a34765f96688df1a644d3eb4164fd90
|
7
|
+
data.tar.gz: d538ed4a9b3f7b1a6d4b791c52c273a084f7ef697dcbd56d6b7905f8071fa3339a89cb53f99f08c86bc385d168efcd45c06f17b1e76f6d28927d73c836130179
|
data/lib/rbbt/matrix.rb
CHANGED
@@ -147,4 +147,14 @@ class Matrix
|
|
147
147
|
matrix.subsets = subsets
|
148
148
|
matrix
|
149
149
|
end
|
150
|
+
|
151
|
+
def tsv(to_gene=true, identifiers = nil)
|
152
|
+
if to_gene
|
153
|
+
file = self.to_gene(identifiers).data_file
|
154
|
+
file.tsv :persist => true, :persist_dir => Matrix.matrix_dir.persist, :type => :double, :merge => true, :cast => nil
|
155
|
+
else
|
156
|
+
self.data_file.tsv :persist => true, :persist_dir => Matrix.matrix_dir.persist, :type => :double, :merge => true, :cast => nil
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
150
160
|
end
|
@@ -46,7 +46,7 @@ module TSV
|
|
46
46
|
if block_given?
|
47
47
|
scores = fields.collect{|field| tsv.sort_by(field, true, &block)}
|
48
48
|
else
|
49
|
-
scores = fields.collect{|field| tsv.sort_by(field, true){|gene,values|
|
49
|
+
scores = fields.collect{|field| tsv.sort_by(field, true){|gene,values| (tsv.type == :single or tsv.type == :list) ? values.to_f : values.flatten.first.to_f}}
|
50
50
|
end
|
51
51
|
positions = {}
|
52
52
|
|
data/share/R/MA.R
CHANGED
@@ -79,6 +79,10 @@ rbbt.dm.matrix.differential <- function(file, main, contrast = NULL, log2 = FALS
|
|
79
79
|
main <- make.names(main);
|
80
80
|
contrast <- make.names(contrast);
|
81
81
|
|
82
|
+
data[data == 0] = NA
|
83
|
+
good.rows = apply(is.na(data),1,sum) != dim(data)[2]
|
84
|
+
data = data[good.rows,]
|
85
|
+
|
82
86
|
ids = rownames(data);
|
83
87
|
if (is.null(key.field)){ key.field = "ID" }
|
84
88
|
|
@@ -137,7 +141,7 @@ rbbt.dm.matrix.differential <- function(file, main, contrast = NULL, log2 = FALS
|
|
137
141
|
result = data.frame(ratio = ratio)
|
138
142
|
}
|
139
143
|
|
140
|
-
rownames(result) <- original.dimnames[[1]]
|
144
|
+
rownames(result) <- original.dimnames[[1]][good.rows]
|
141
145
|
|
142
146
|
if (is.null(outfile)){
|
143
147
|
return(result);
|
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.24
|
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-03-
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|