rbbt-sources 3.1.9 → 3.1.10
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 +9 -7
- data/share/install/Organism/organism_helpers.rb +3 -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: 47f883226de2b2dd6a0d9a91473aa012d2930f21
|
|
4
|
+
data.tar.gz: db8145fdcc9052ee7db1d7934153c623b0ab77b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d28848abcab0fd26b016f1e50a53572d338d8cd8de02d451730f49199ba39e5453033b286297aeaaa29e71f3a30dd7eebb92c43cf3fae5344298f3a7ce202099
|
|
7
|
+
data.tar.gz: 8e6763e6d1a082a907735444dd81424a18179ab68b65e2705708b6d5d440a6ec8a1a5658d51310a5558562e7cdf9f42cc8d6d14e3e81a6365a4b2fc339331a9a
|
data/lib/rbbt/sources/tfacts.rb
CHANGED
|
@@ -4,18 +4,19 @@ require 'rbbt/resource'
|
|
|
4
4
|
|
|
5
5
|
module TFacts
|
|
6
6
|
extend Resource
|
|
7
|
-
self.subdir = "share/databases/
|
|
7
|
+
self.subdir = "share/databases/TFacts"
|
|
8
8
|
|
|
9
|
-
TFacts.claim TFacts.source["Catalogues.xls"], :url, "http://www.tfacts.org/TFactS-new/TFactS-v2/tfacts/data/Catalogues.xls"
|
|
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 TFacts.source["Catalogues.xls"].produce.find
|
|
13
|
+
book = Spreadsheet.open TFacts[".source"]["Catalogues.xls"].produce.find
|
|
14
14
|
sheet = book.worksheet 0
|
|
15
15
|
|
|
16
|
-
tsv = TSV.setup({}, :key_field => "Associated Gene Name", :fields => ["Transcription Factor Associated Gene Name"], :namespace => "Hsa", :type => :flat)
|
|
16
|
+
tsv = TSV.setup({}, :key_field => "Target Gene (Associated Gene Name)", :fields => ["Transcription Factor (Associated Gene Name)"], :namespace => "Hsa", :type => :flat)
|
|
17
17
|
sheet.each do |row|
|
|
18
18
|
target, tf = row.values_at 0, 1
|
|
19
|
+
next if tf =~ /OFFICIAL_/
|
|
19
20
|
tsv[target] ||= []
|
|
20
21
|
tsv[target] << tf
|
|
21
22
|
end
|
|
@@ -25,12 +26,13 @@ module TFacts
|
|
|
25
26
|
|
|
26
27
|
TFacts.claim TFacts.targets_signed, :proc do
|
|
27
28
|
require 'spreadsheet'
|
|
28
|
-
book = Spreadsheet.open TFacts.source["Catalogues.xls"].produce.find
|
|
29
|
+
book = Spreadsheet.open TFacts[".source"]["Catalogues.xls"].produce.find
|
|
29
30
|
sheet = book.worksheet 0
|
|
30
31
|
|
|
31
|
-
tsv = TSV.setup({}, :key_field => "Associated Gene Name", :fields => ["Transcription Factor Associated Gene Name", "Sign"], :namespace => "Hsa", :type => :double)
|
|
32
|
+
tsv = TSV.setup({}, :key_field => "Target Gene (Associated Gene Name)", :fields => ["Transcription Factor (Associated Gene Name)", "Sign"], :namespace => "Hsa", :type => :double)
|
|
32
33
|
sheet.each do |row|
|
|
33
34
|
target, tf, sign = row.values_at 0, 1, 2
|
|
35
|
+
next if tf =~ /OFFICIAL_/
|
|
34
36
|
tsv[target] ||= [[],[]]
|
|
35
37
|
tsv[target][0] << tf
|
|
36
38
|
tsv[target][1] << sign
|
|
@@ -40,7 +42,7 @@ module TFacts
|
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
TFacts.claim TFacts.regulators, :proc do
|
|
43
|
-
TFacts.targets.tsv.reorder("Transcription Factor Associated Gene Name").to_s
|
|
45
|
+
TFacts.targets.tsv.reorder("Transcription Factor (Associated Gene Name)").to_s
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
end
|
|
@@ -414,6 +414,7 @@ file 'gene_go_bp' => 'gene_go' do |t|
|
|
|
414
414
|
end
|
|
415
415
|
|
|
416
416
|
|
|
417
|
+
gene_go.filename = t.name
|
|
417
418
|
Misc.sensiblewrite(t.name, gene_go.slice("GO ID").to_s)
|
|
418
419
|
end
|
|
419
420
|
|
|
@@ -429,6 +430,7 @@ file 'gene_go_cc' => 'gene_go' do |t|
|
|
|
429
430
|
end
|
|
430
431
|
|
|
431
432
|
|
|
433
|
+
gene_go.filename = t.name
|
|
432
434
|
Misc.sensiblewrite(t.name, gene_go.slice("GO ID").to_s)
|
|
433
435
|
end
|
|
434
436
|
|
|
@@ -444,6 +446,7 @@ file 'gene_go_mf' => 'gene_go' do |t|
|
|
|
444
446
|
end
|
|
445
447
|
|
|
446
448
|
|
|
449
|
+
gene_go.filename = t.name
|
|
447
450
|
Misc.sensiblewrite(t.name, gene_go.slice("GO ID").to_s)
|
|
448
451
|
end
|
|
449
452
|
|
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.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miguel Vazquez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-02-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rbbt-util
|