bel_parser 1.0.0.alpha.50-java → 1.0.0.alpha.51-java

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: f5ad3304dffde0372b6ab76bd23b845e5c235739
4
- data.tar.gz: 09295d25d23b4dd1408c5937e6729365ab868e8a
3
+ metadata.gz: ac73988228b7a8ad17fc167a1538beea9fdd6267
4
+ data.tar.gz: f9f27782b9791b99d315465363f3608a0c6016d1
5
5
  SHA512:
6
- metadata.gz: e02dc1094179515507bf9f37ee3a1da14f2219a0725bb78f9535a1015b8ba25e4ea8ceee7ced9f93b662de296f4612cdaf929b63574b20e22225ba91eee974a4
7
- data.tar.gz: ec9718f4c7bcc2bdb55f238939358dff5d496eec97a66e0c7da96dd3b5a2068ac2ef20bbec816eb428e614962ee10a62b1efde34d7cfd15c4fd302b4a07b9812
6
+ metadata.gz: d28a74c92a301cddd0910bd7ae8b2348ccb74a1066c78ec1c5b0f5744ceb3f090e9230ecb9ba271e2db45b6a3bf9db9155a24fb08264a46e626d6b7a9ebfc4bf
7
+ data.tar.gz: 59f3d31887b6a7b36e5e5016db68596917933bcc79055777c48d8fb680873f08c658cc1d2c33196316b02b7ec4c7e15b4b83f3e568840bfcc934a0d7ef69ed53
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha.50
1
+ 1.0.0.alpha.51
@@ -16,6 +16,9 @@ require 'bel_parser/ast_filter'
16
16
  # Language; version-independent classes
17
17
  require 'bel_parser/language'
18
18
 
19
+ # BEL Resource support
20
+ require 'bel_parser/resources'
21
+
19
22
  # BEL Expression support
20
23
  require 'bel_parser/expression'
21
24
 
@@ -0,0 +1,201 @@
1
+ require_relative 'expression/model/namespace'
2
+
3
+ module BELParser
4
+ module Resources
5
+ BASE_URL = 'http://resource.belframework.org/belframework/latest-release'
6
+ DEFAULT_NAMESPACES = {
7
+ 'AFFX' =>
8
+ BELParser::Expression::Model::Namespace.new(
9
+ 'AFFX',
10
+ 'http://www.openbel.org/bel/namespace/affy-probeset',
11
+ "#{BASE_URL}/namespace/affy-probeset-ids.belns"),
12
+ 'CHEBI' =>
13
+ BELParser::Expression::Model::Namespace.new(
14
+ 'CHEBI',
15
+ 'http://www.openbel.org/bel/namespace/chebi',
16
+ "#{BASE_URL}/namespace/chebi.belns"),
17
+ 'CHEBIID' =>
18
+ BELParser::Expression::Model::Namespace.new(
19
+ 'CHEBIID',
20
+ 'http://www.openbel.org/bel/namespace/chebi',
21
+ "#{BASE_URL}/namespace/chebi-ids.belns"),
22
+ 'DEFAULT' =>
23
+ BELParser::Expression::Model::Namespace.new(
24
+ 'DEFAULT',
25
+ 'http://www.openbel.org/bel/namespace/default',
26
+ "#{BASE_URL}/namespace/default-bel-namespace.belns"),
27
+ 'DO' =>
28
+ BELParser::Expression::Model::Namespace.new(
29
+ 'DO',
30
+ 'http://www.openbel.org/bel/namespace/disease-ontology',
31
+ "#{BASE_URL}/namespace/disease-ontology.belns"),
32
+ 'DOID' =>
33
+ BELParser::Expression::Model::Namespace.new(
34
+ 'DOID',
35
+ 'http://www.openbel.org/bel/namespace/disease-ontology',
36
+ "#{BASE_URL}/namespace/disease-ontology-ids.belns"),
37
+ 'EGID' =>
38
+ BELParser::Expression::Model::Namespace.new(
39
+ 'EGID',
40
+ 'http://www.openbel.org/bel/namespace/entrez-gene',
41
+ "#{BASE_URL}/namespace/entrez-gene-ids.belns"),
42
+ 'GOBP' =>
43
+ BELParser::Expression::Model::Namespace.new(
44
+ 'GOBP',
45
+ 'http://www.openbel.org/bel/namespace/go-biological-process',
46
+ "#{BASE_URL}/namespace/go-biological-process.belns"),
47
+ 'GOBPID' =>
48
+ BELParser::Expression::Model::Namespace.new(
49
+ 'GOBPID',
50
+ 'http://www.openbel.org/bel/namespace/go-biological-process',
51
+ "#{BASE_URL}/namespace/go-biological-process-ids.belns"),
52
+ 'GOCC' =>
53
+ BELParser::Expression::Model::Namespace.new(
54
+ 'GOCC',
55
+ 'http://www.openbel.org/bel/namespace/go-cellular-component',
56
+ "#{BASE_URL}/namespace/go-cellular-component.belns"),
57
+ 'GOCCID' =>
58
+ BELParser::Expression::Model::Namespace.new(
59
+ 'GOCCID',
60
+ 'http://www.openbel.org/bel/namespace/go-cellular-component',
61
+ "#{BASE_URL}/namespace/go-cellular-component-ids.belns"),
62
+ 'HGNC' =>
63
+ BELParser::Expression::Model::Namespace.new(
64
+ 'HGNC',
65
+ 'http://www.openbel.org/bel/namespace/hgnc-human-genes',
66
+ "#{BASE_URL}/namespace/hgnc-human-genes.belns"),
67
+ 'MESHCS' =>
68
+ BELParser::Expression::Model::Namespace.new(
69
+ 'MESHCS',
70
+ 'http://www.openbel.org/bel/namespace/mesh-cellular-structures',
71
+ "#{BASE_URL}/namespace/mesh-cellular-structures.belns"),
72
+ 'MESHCSID' =>
73
+ BELParser::Expression::Model::Namespace.new(
74
+ 'MESHCSID',
75
+ 'http://www.openbel.org/bel/namespace/mesh-cellular-structures',
76
+ "#{BASE_URL}/namespace/mesh-cellular-structures-ids.belns"),
77
+ 'MESHC' =>
78
+ BELParser::Expression::Model::Namespace.new(
79
+ 'MESHC',
80
+ 'http://www.openbel.org/bel/namespace/mesh-chemicals',
81
+ "#{BASE_URL}/namespace/mesh-chemicals.belns"),
82
+ 'MESHCID' =>
83
+ BELParser::Expression::Model::Namespace.new(
84
+ 'MESHCID',
85
+ 'http://www.openbel.org/bel/namespace/mesh-chemicals',
86
+ "#{BASE_URL}/namespace/mesh-chemicals-ids.belns"),
87
+ 'MESHD' =>
88
+ BELParser::Expression::Model::Namespace.new(
89
+ 'MESHD',
90
+ 'http://www.openbel.org/bel/namespace/mesh-diseases',
91
+ "#{BASE_URL}/namespace/mesh-diseases.belns"),
92
+ 'MESHDID' =>
93
+ BELParser::Expression::Model::Namespace.new(
94
+ 'MESHDID',
95
+ 'http://www.openbel.org/bel/namespace/mesh-diseases',
96
+ "#{BASE_URL}/namespace/mesh-diseases-ids.belns"),
97
+ 'MESHPP' =>
98
+ BELParser::Expression::Model::Namespace.new(
99
+ 'MESHPP',
100
+ 'http://www.openbel.org/bel/namespace/mesh-processes',
101
+ "#{BASE_URL}/namespace/mesh-processes.belns"),
102
+ 'MESHPPID' =>
103
+ BELParser::Expression::Model::Namespace.new(
104
+ 'MESHPPID',
105
+ 'http://www.openbel.org/bel/namespace/mesh-processes',
106
+ "#{BASE_URL}/namespace/mesh-processes-ids.belns"),
107
+ 'MGI' =>
108
+ BELParser::Expression::Model::Namespace.new(
109
+ 'MGI',
110
+ 'http://www.openbel.org/bel/namespace/mgi-mouse-genes',
111
+ "#{BASE_URL}/namespace/mgi-mouse-genes.belns"),
112
+ 'RGD' =>
113
+ BELParser::Expression::Model::Namespace.new(
114
+ 'RGD',
115
+ 'http://www.openbel.org/bel/namespace/rgd-rat-genes',
116
+ "#{BASE_URL}/namespace/rgd-rat-genes.belns"),
117
+ 'SCHEM' =>
118
+ BELParser::Expression::Model::Namespace.new(
119
+ 'SCHEM',
120
+ 'http://www.openbel.org/bel/namespace/selventa-legacy-chemicals',
121
+ "#{BASE_URL}/namespace/selventa-legacy-chemicals.belns"),
122
+ 'SCOMP' =>
123
+ BELParser::Expression::Model::Namespace.new(
124
+ 'SCOMP',
125
+ 'http://www.openbel.org/bel/namespace/selventa-named-complexes',
126
+ "#{BASE_URL}/namespace/selventa-named-complexes.belns"),
127
+ 'SDIS' =>
128
+ BELParser::Expression::Model::Namespace.new(
129
+ 'SDIS',
130
+ 'http://www.openbel.org/bel/namespace/selventa-legacy-diseases',
131
+ "#{BASE_URL}/namespace/selventa-legacy-diseases"),
132
+ 'SFAM' =>
133
+ BELParser::Expression::Model::Namespace.new(
134
+ 'SFAM',
135
+ 'http://www.openbel.org/bel/namespace/selventa-protein-families',
136
+ "#{BASE_URL}/namespace/selventa-protein-families.belns"),
137
+ 'SP' =>
138
+ BELParser::Expression::Model::Namespace.new(
139
+ 'SP',
140
+ 'http://www.openbel.org/bel/namespace/swissprot',
141
+ "#{BASE_URL}/namespace/swissprot.belns"),
142
+ 'SPID' =>
143
+ BELParser::Expression::Model::Namespace.new(
144
+ 'SPID',
145
+ 'http://www.openbel.org/bel/namespace/swissprot',
146
+ "#{BASE_URL}/namespace/swissprot-ids.belns"),
147
+ }
148
+
149
+ DEFAULT_ANNOTATIONS = {
150
+ 'Anatomy' =>
151
+ BELParser::Expression::Model::Namespace.new(
152
+ 'Anatomy',
153
+ 'http://www.openbel.org/bel/namespace/uberon',
154
+ "#{BASE_URL}/annotation/anatomy.belanno"),
155
+ 'Cell' =>
156
+ BELParser::Expression::Model::Namespace.new(
157
+ 'Cell',
158
+ 'http://www.openbel.org/bel/namespace/cell-ontology',
159
+ "#{BASE_URL}/annotation/cell.belanno"),
160
+ 'CellLine' =>
161
+ BELParser::Expression::Model::Namespace.new(
162
+ 'CellLine',
163
+ 'http://www.openbel.org/bel/namespace/cell-line-ontology',
164
+ "#{BASE_URL}/annotation/cell-line.belanno"),
165
+ 'Disease' =>
166
+ BELParser::Expression::Model::Namespace.new(
167
+ 'Disease',
168
+ 'http://www.openbel.org/bel/namespace/disease-ontology',
169
+ "#{BASE_URL}/annotation/disease.belanno"),
170
+ 'ExperimentalFactor' =>
171
+ BELParser::Expression::Model::Namespace.new(
172
+ 'ExperimentalFactor',
173
+ 'http://www.openbel.org/bel/namespace/experimental-factor-ontology',
174
+ "#{BASE_URL}/annotation/disease.belanno"),
175
+ 'MeSHAnatomy' =>
176
+ BELParser::Expression::Model::Namespace.new(
177
+ 'MeSHAnatomy',
178
+ 'http://www.openbel.org/bel/namespace/mesh-anatomy',
179
+ "#{BASE_URL}/annotation/mesh-anatomy.belanno"),
180
+ 'MeSHDisease' =>
181
+ BELParser::Expression::Model::Namespace.new(
182
+ 'MeSHDisease',
183
+ 'http://www.openbel.org/bel/namespace/mesh-diseases',
184
+ "#{BASE_URL}/annotation/mesh-diseases.belanno"),
185
+ 'Species' =>
186
+ BELParser::Expression::Model::Namespace.new(
187
+ 'Species',
188
+ 'http://www.openbel.org/bel/namespace/ncbi-taxonomy',
189
+ "#{BASE_URL}/annotation/species-taxonomy-id.belanno")
190
+ }
191
+
192
+ def self.included(another_class)
193
+ DEFAULT_ANNOTATIONS.each do |keyword, annotation|
194
+ another_class.const_set(keyword.to_sym, annotation)
195
+ end
196
+ DEFAULT_NAMESPACES.each do |keyword, namespace|
197
+ another_class.const_set(keyword.to_sym, namespace)
198
+ end
199
+ end
200
+ end
201
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.50
4
+ version: 1.0.0.alpha.51
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi
@@ -363,6 +363,7 @@ files:
363
363
  - lib/bel_parser/resource/resource_url_reader.rb
364
364
  - lib/bel_parser/resource/sparql_reader.rb
365
365
  - lib/bel_parser/resource/value.rb
366
+ - lib/bel_parser/resources.rb
366
367
  - lib/bel_parser/script.rb
367
368
  - lib/bel_parser/script/apply_resource_uri.rb
368
369
  - lib/bel_parser/script/filter.rb