rbbt-sources 3.0.18 → 3.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/sources/kegg.rb +38 -38
- 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: 09103120ab258ebec5b5229f3af3b8f81b08a09d
|
4
|
+
data.tar.gz: 859133185352820244010f79dcbff16fb74c8472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 973ad5daac0276bf77ca2d8379415ffb8933dbee131a40795c07316b4f78af6e1776a24c4036b52248f435864264a339d7f3205516094f2d332e5e8a2032f59e
|
7
|
+
data.tar.gz: 2ff6ccd29f102f4c256a4aa84e151210e6fb51586dc97e1f19ed08b9ab7b0e9afcbc61ed39543b9d0a1be68edcce2627ab92ebc4afc1537f124a6cd4f7306499
|
data/lib/rbbt/sources/kegg.rb
CHANGED
@@ -79,44 +79,44 @@ if defined? Entity
|
|
79
79
|
|
80
80
|
if defined? Gene and Entity === Gene
|
81
81
|
module Gene
|
82
|
-
|
83
|
-
|
84
|
-
def to_kegg
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
end
|
92
|
-
|
93
|
-
def from_kegg
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
end
|
101
|
-
|
102
|
-
def self.gene_kegg_pathway_index
|
103
|
-
|
104
|
-
|
105
|
-
end
|
106
|
-
|
107
|
-
property :to => :array2single do |new_format|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
end
|
82
|
+
add_identifiers KEGG.identifiers
|
83
|
+
|
84
|
+
#def to_kegg
|
85
|
+
# return self if format == "KEGG Gene ID"
|
86
|
+
# if Array === self
|
87
|
+
# Gene.setup(KEGG.index2kegg.values_at(*to("Ensembl Gene ID")), "KEGG Gene ID", organism).tap{|o| o.extend AnnotatedArray if AnnotatedArray === self }
|
88
|
+
# else
|
89
|
+
# Gene.setup(KEGG.index2kegg[to("Ensembl Gene ID")], "KEGG Gene ID", organism).tap{|o| o.extend AnnotatedArray if AnnotatedArray === self }
|
90
|
+
# end
|
91
|
+
#end
|
92
|
+
|
93
|
+
#def from_kegg
|
94
|
+
# return self unless format == "KEGG Gene ID"
|
95
|
+
# if Array === self
|
96
|
+
# Gene.setup(KEGG.index2ens.values_at(*self), "Ensembl Gene ID", organism).tap{|o| o.extend AnnotatedArray if AnnotatedArray === self }
|
97
|
+
# else
|
98
|
+
# Gene.setup(KEGG.index2ens[self], "Ensembl Gene ID", organism).tap{|o| o.extend AnnotatedArray if AnnotatedArray === self }
|
99
|
+
# end
|
100
|
+
#end
|
101
|
+
|
102
|
+
#def self.gene_kegg_pathway_index
|
103
|
+
# @@gene_kegg_pathway_index ||=
|
104
|
+
# KEGG.gene_pathway.tsv(:persist => true, :key_field => "KEGG Gene ID", :fields => ["KEGG Pathway ID"], :type => :flat, :merge => true)
|
105
|
+
#end
|
106
|
+
|
107
|
+
#property :to => :array2single do |new_format|
|
108
|
+
# case
|
109
|
+
# when format == new_format
|
110
|
+
# self
|
111
|
+
# when format == "KEGG Gene ID"
|
112
|
+
# ensembl = from_kegg.clean_annotations
|
113
|
+
# Gene.setup(Translation.job(:tsv_translate, "", :organism => organism, :genes => ensembl, :format => new_format).exec.chunked_values_at(ensembl), new_format, organism).tap{|o| o.extend AnnotatedArray if AnnotatedArray === self }
|
114
|
+
# when new_format == "KEGG Gene ID"
|
115
|
+
# to_kegg
|
116
|
+
# else
|
117
|
+
# Gene.setup(Translation.job(:tsv_translate, "", :organism => organism, :genes => self, :format => new_format).exec.chunked_values_at(self), new_format, organism).tap{|o| o.extend AnnotatedArray if AnnotatedArray === self }
|
118
|
+
# end
|
119
|
+
#end
|
120
120
|
|
121
121
|
property :kegg_pathways => :array2single do
|
122
122
|
@kegg_pathways ||= Gene.gene_kegg_pathway_index.values_at(*self.to_kegg).
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-sources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|