rbbt-dm 1.1.44 → 1.1.45
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 +20 -0
- 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: 3d0fe8cd4d9acfbef39eab9bb2cc6537dc4846b8
|
4
|
+
data.tar.gz: 0f373711bbd5c67c072012570b67301336082df3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f79f5464f66d147ca1e86fa30a86d911dc84e6a2766e13c7a04be1141405e9f46e545e76f04283a765b168c79b37ecde140bee096c9ce85604ada8cd5176db
|
7
|
+
data.tar.gz: 5e3aea0ec0e1c5683ac177e830883c4987dedd524353e14124148edc3c87181374a20a09c7b41c37c1bdb68e89efe0708fb532d3bc90f1403b4eb61bec8c87f4
|
data/lib/rbbt/matrix.rb
CHANGED
@@ -176,6 +176,26 @@ class RbbtMatrix
|
|
176
176
|
matrix
|
177
177
|
end
|
178
178
|
|
179
|
+
def to_name(identifiers = nil)
|
180
|
+
require 'rbbt/tsv/change_id'
|
181
|
+
|
182
|
+
name = data_file =~ /:>/ ? File.basename(data_file) : data_file
|
183
|
+
|
184
|
+
file = Persist.persist(data_file, :tsv, :prefix => "Name", :check => [data_file], :dir => RbbtMatrix.matrix_dir.values, :no_load => true) do
|
185
|
+
|
186
|
+
data = data_file.tsv(:cast => :to_f)
|
187
|
+
|
188
|
+
identifiers = [identifiers, @identifiers, data.identifiers, Organism.identifiers(organism)].flatten.compact.uniq
|
189
|
+
|
190
|
+
data.change_key("Associated Gene Name", :identifiers => identifiers.reverse) do |v|
|
191
|
+
Misc.mean(v.compact)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
subsets = self.subsets
|
195
|
+
matrix = RbbtMatrix.new file, labels, value_type, "Associated Gene Name", organism
|
196
|
+
matrix.subsets = subsets
|
197
|
+
matrix
|
198
|
+
end
|
179
199
|
def to_barcode_ruby(factor = 2)
|
180
200
|
name = data_file =~ /:>/ ? File.basename(data_file) : data_file
|
181
201
|
|
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.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|