rbbt-sources 3.1.21 → 3.1.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bdca7fd8c0c9f60055453c7f318a699eae54738
4
- data.tar.gz: c0b08856ddd9668b6dbbadd2035653ce24506f04
3
+ metadata.gz: 6ea2d8738ff8b0d863b3bf5ba98033c4ba1c7fe0
4
+ data.tar.gz: 3a530a18c08891019bc107d2e28b138eafd1e92b
5
5
  SHA512:
6
- metadata.gz: 4e515516855aa249e758a23da1d1d16915697cf3647bf88c0791b5593b435c2adf4b44006081473d4068a76b55d8b018093cba49070144044c68aa3d9611450c
7
- data.tar.gz: eed95d673673f5ec047b37911c44d6876fbd55d7efdc4884863902f6d76bdeda22e5ac5a1982344488ff8fb68808c8233df78eb0baa1e9fa5a2d712485296577
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
+
@@ -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
- Rbbt.claim Rbbt.share.databases.GO.gene_ontology, :url, 'http://purl.obolibrary.org/obo/go.obo'
11
- Rbbt.claim Rbbt.share.databases.GO.annotations, :url, 'http://geneontology.org/gene-associations/goa_human.gaf.gz'
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.21
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-01 00:00:00.000000000 Z
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