rbbt-sources 3.1.45 → 3.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rbbt/sources/tfacts.rb +14 -14
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9cfdfc8f6fd6a11106d90cf39dc8f10165fd36128fe69a8ca4c72fcf878183c3
|
|
4
|
+
data.tar.gz: f268c37d7c50b74fb67d2dae77bf25c93dbf1013f23a11e1ffeb0f024fdabdc0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6e29cb4355ad3307bf3ccbead098406e51216e963cd201fc11c17aa4aad263d184ca1ab1389c4940e32bf1d541471a9aac326b12055585b515f26c63592a025
|
|
7
|
+
data.tar.gz: 4663061a1b3f8a80914468c8af3bb8b5da821739fe8943011881ba9b89405e34b40ec9b145e9a7f9fdf7b2cc7cdf8f294fa978b01c41b1f8693a4e73b186d65f
|
data/lib/rbbt/sources/tfacts.rb
CHANGED
|
@@ -2,15 +2,15 @@ require 'rbbt'
|
|
|
2
2
|
require 'rbbt/tsv'
|
|
3
3
|
require 'rbbt/resource'
|
|
4
4
|
|
|
5
|
-
module
|
|
5
|
+
module TFactS
|
|
6
6
|
extend Resource
|
|
7
|
-
self.subdir = "share/databases/
|
|
7
|
+
self.subdir = "share/databases/TFactS"
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
TFactS.claim TFactS[".source"]["Catalogues.xls"], :url, "http://www.tfacts.org/TFactS-new/TFactS-v2/tfacts/data/Catalogues.xls"
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
TFactS.claim TFactS.targets, :proc do
|
|
12
12
|
require 'spreadsheet'
|
|
13
|
-
book = Spreadsheet.open
|
|
13
|
+
book = Spreadsheet.open TFactS[".source"]["Catalogues.xls"].produce.find
|
|
14
14
|
sheet = book.worksheet 0
|
|
15
15
|
|
|
16
16
|
tsv = TSV.setup({}, :key_field => "Target Gene (Associated Gene Name)", :fields => ["Transcription Factor (Associated Gene Name)"], :namespace => "Hsa", :type => :flat)
|
|
@@ -24,9 +24,9 @@ module TFacts
|
|
|
24
24
|
tsv.to_s
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
TFactS.claim TFactS.targets_signed, :proc do
|
|
28
28
|
require 'spreadsheet'
|
|
29
|
-
book = Spreadsheet.open
|
|
29
|
+
book = Spreadsheet.open TFactS[".source"]["Catalogues.xls"].produce.find
|
|
30
30
|
sheet = book.worksheet 1
|
|
31
31
|
|
|
32
32
|
tsv = TSV.setup({}, :key_field => "Target Gene (Associated Gene Name)", :fields => ["Transcription Factor (Associated Gene Name)", "Sign", "PMID"], :namespace => "Hsa", :type => :double)
|
|
@@ -43,13 +43,13 @@ module TFacts
|
|
|
43
43
|
tsv.to_s
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
TFactS.claim TFactS.regulators, :proc do
|
|
47
|
+
TFactS.targets.tsv.reorder("Transcription Factor (Associated Gene Name)").to_s
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
TFactS.claim TFactS.tf_tg, :proc do
|
|
51
51
|
require 'spreadsheet'
|
|
52
|
-
book = Spreadsheet.open
|
|
52
|
+
book = Spreadsheet.open TFactS[".source"]["Catalogues.xls"].produce.find
|
|
53
53
|
|
|
54
54
|
tsv = TSV.setup({}, :key_field => "Transcription Factor (Associated Gene Name)", :fields => ["Target Gene (Associated Gene Name)", "Sign", "Species", "Source", "PMID"], :namespace => "Hsa", :type => :double)
|
|
55
55
|
|
|
@@ -128,16 +128,16 @@ if defined? Entity and defined? Gene and Entity === Gene
|
|
|
128
128
|
|
|
129
129
|
module Gene
|
|
130
130
|
property :is_transcription_factor? => :array2single do
|
|
131
|
-
tfs =
|
|
131
|
+
tfs = TFactS.targets.keys
|
|
132
132
|
self.name.collect{|gene| tfs.include? gene}
|
|
133
133
|
end
|
|
134
134
|
|
|
135
135
|
property :transcription_regulators => :array2single do
|
|
136
|
-
Gene.setup(
|
|
136
|
+
Gene.setup(TFactS.regulators.tsv(:persist => true).values_at(*self.name), "Associated Gene Name", self.organism)
|
|
137
137
|
end
|
|
138
138
|
|
|
139
139
|
property :transcription_targets => :array2single do
|
|
140
|
-
Gene.setup(
|
|
140
|
+
Gene.setup(TFactS.targets.tsv(:persist => true).values_at(*self.name), "Associated Gene Name", self.organism)
|
|
141
141
|
end
|
|
142
142
|
end
|
|
143
143
|
end
|
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.1.
|
|
4
|
+
version: 3.1.46
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miguel Vazquez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rbbt-util
|