rbbt-sources 3.1.21 → 3.1.22
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/PRO.rb +47 -0
- data/lib/rbbt/sources/go.rb +10 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ea2d8738ff8b0d863b3bf5ba98033c4ba1c7fe0
|
4
|
+
data.tar.gz: 3a530a18c08891019bc107d2e28b138eafd1e92b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0268721e94bd69fd1723049d47f041f4be13a6b860bb612c75344d4e56ada4886fba64cba7a63c81a8058b7245acb59ee8abd9d75024fd1437269cbe256cf14
|
7
|
+
data.tar.gz: 0e531a35db84e9151a02197585740ba44792e9ddc3b12586eb790c6eaa2aa48dfc74624e199f4b5c6de97860bc08057f9915aad5041fbdb1920e78f5d9d3fa2b
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'rbbt-util'
|
2
|
+
require 'rbbt/resource'
|
3
|
+
|
4
|
+
module PRO
|
5
|
+
extend Resource
|
6
|
+
self.subdir = 'share/databases/PRO'
|
7
|
+
|
8
|
+
def self.organism(org="Hsa")
|
9
|
+
require 'rbbt/sources/organism'
|
10
|
+
Organism.default_code(org)
|
11
|
+
end
|
12
|
+
|
13
|
+
#self.search_paths = {}
|
14
|
+
#self.search_paths[:default] = :lib
|
15
|
+
|
16
|
+
PRO.claim PRO.identifiers, :proc do
|
17
|
+
url = "ftp://ftp.pir.georgetown.edu/databases/ontology/pro_obo/PRO_mappings/uniprotmapping.txt"
|
18
|
+
|
19
|
+
dumper = TSV::Dumper.new :key_field => "PRO ID", :fields => ["UniProt/SwissProt Accession"], :type => :flat, :namespace => PRO.organism
|
20
|
+
dumper.init
|
21
|
+
TSV.traverse Open.open(url), :type => :array, :into => dumper, :bar => true do |line|
|
22
|
+
pro, uni = line.split("\t")
|
23
|
+
[pro, [uni.split(":").last]]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
PRO.claim PRO.uniprot_equivalences, :proc do
|
28
|
+
|
29
|
+
dumper = TSV::Dumper.new :key_field => "UniProt/SwissProt Accession", :fields => ["UniProt/SwissProt Accession"], :type => :flat, :namespace => PRO.organism
|
30
|
+
dumper.init
|
31
|
+
TSV.traverse PRO.identifiers, :into => dumper, :bar => true do |pro,values|
|
32
|
+
res = []
|
33
|
+
res.extend MultipleResult
|
34
|
+
unis = values.first
|
35
|
+
|
36
|
+
unis.each do |uni|
|
37
|
+
res << [uni,unis]
|
38
|
+
end
|
39
|
+
|
40
|
+
res
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
iif PRO.identifiers.produce.find if __FILE__ == $0
|
46
|
+
iif PRO.uniprot_equivalences.produce(true).find if __FILE__ == $0
|
47
|
+
|
data/lib/rbbt/sources/go.rb
CHANGED
@@ -6,9 +6,17 @@ require 'rbbt/persist/tsv'
|
|
6
6
|
# now all it does is provide a translation form id to the actual names.
|
7
7
|
module GO
|
8
8
|
|
9
|
+
extend Resource
|
10
|
+
|
11
|
+
extend Resource
|
12
|
+
self.subdir = 'share/databases/GO'
|
13
|
+
|
9
14
|
#Rbbt.claim Rbbt.share.databases.GO.gslim_generic, :url, 'http://www.geneontology.org/GO_slims/goslim_generic.obo'
|
10
|
-
|
11
|
-
|
15
|
+
GO.claim GO.gene_ontology, :url, 'http://purl.obolibrary.org/obo/go.obo'
|
16
|
+
GO.claim GO.Hsa.annotations, :url, 'http://geneontology.org/gene-associations/goa_human.gaf.gz'
|
17
|
+
|
18
|
+
GO.claim GO.annotations, :url, 'http://geneontology.org/gene-associations/goa_human.gaf.gz'
|
19
|
+
|
12
20
|
|
13
21
|
MULTIPLE_VALUE_FIELDS = %w(is_a)
|
14
22
|
TSV_GENE_ONTOLOGY = File.join(Persist.cachedir, 'gene_ontology')
|
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.22
|
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-12-
|
11
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- lib/rbbt/sources/MCLP.rb
|
98
98
|
- lib/rbbt/sources/MSigDB.rb
|
99
99
|
- lib/rbbt/sources/NCI.rb
|
100
|
+
- lib/rbbt/sources/PRO.rb
|
100
101
|
- lib/rbbt/sources/PSI_MI.rb
|
101
102
|
- lib/rbbt/sources/STITCH.rb
|
102
103
|
- lib/rbbt/sources/barcode.rb
|