bel_parser 1.0.0.alpha.12 → 1.0.0.alpha.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/.gemspec +1 -1
  3. data/VERSION +1 -1
  4. data/bin/bel2_validator +35 -8
  5. data/lib/bel_parser/expression/validator.rb +3 -2
  6. data/lib/bel_parser/language/apply_namespace_encoding.rb +96 -0
  7. data/lib/bel_parser/language/base_specification.rb +82 -0
  8. data/lib/bel_parser/language/expression_validator.rb +6 -2
  9. data/lib/bel_parser/language/relationship.rb +1 -1
  10. data/lib/bel_parser/language/semantics/signature_mapping.rb +26 -32
  11. data/lib/bel_parser/language/semantics_ast.rb +285 -149
  12. data/lib/bel_parser/language/semantics_ast_warnings.rb +180 -0
  13. data/lib/bel_parser/language/semantics_result.rb +11 -2
  14. data/lib/bel_parser/language/semantics_type_warning.rb +22 -0
  15. data/lib/bel_parser/language/semantics_warning.rb +8 -0
  16. data/lib/bel_parser/language/specification.rb +38 -55
  17. data/lib/bel_parser/language/syntax/undefined_namespace_value.rb +43 -0
  18. data/lib/bel_parser/language/syntax_error.rb +8 -0
  19. data/lib/bel_parser/language/syntax_result.rb +8 -0
  20. data/lib/bel_parser/language/syntax_warning.rb +9 -4
  21. data/lib/bel_parser/language/version1_0/functions/abundance.rb +5 -6
  22. data/lib/bel_parser/language/version1_0/functions/biological_process.rb +5 -6
  23. data/lib/bel_parser/language/version1_0/functions/complex_abundance.rb +6 -7
  24. data/lib/bel_parser/language/version1_0/functions/fusion.rb +39 -60
  25. data/lib/bel_parser/language/version1_0/functions/gene_abundance.rb +9 -12
  26. data/lib/bel_parser/language/version1_0/functions/list.rb +5 -6
  27. data/lib/bel_parser/language/version1_0/functions/micro_rna_abundance.rb +5 -6
  28. data/lib/bel_parser/language/version1_0/functions/pathology.rb +5 -6
  29. data/lib/bel_parser/language/version1_0/functions/protein_abundance.rb +16 -30
  30. data/lib/bel_parser/language/version1_0/functions/protein_modification.rb +15 -27
  31. data/lib/bel_parser/language/version1_0/functions/rna_abundance.rb +8 -11
  32. data/lib/bel_parser/language/version1_0/functions/substitution.rb +6 -12
  33. data/lib/bel_parser/language/version1_0/functions/translocation.rb +9 -12
  34. data/lib/bel_parser/language/version1_0/functions/truncation.rb +2 -4
  35. data/lib/bel_parser/language/version1_0/value_encodings/abundance.rb +21 -0
  36. data/lib/bel_parser/language/version1_0/value_encodings/any.rb +74 -0
  37. data/lib/bel_parser/language/version1_0/value_encodings/biological_process.rb +21 -0
  38. data/lib/bel_parser/language/version1_0/value_encodings/complex_abundance.rb +21 -0
  39. data/lib/bel_parser/language/version1_0/value_encodings/gene_abundance.rb +21 -0
  40. data/lib/bel_parser/language/version1_0/value_encodings/micro_rna_abundance.rb +21 -0
  41. data/lib/bel_parser/language/version1_0/value_encodings/pathology.rb +21 -0
  42. data/lib/bel_parser/language/version1_0/value_encodings/protein_abundance.rb +21 -0
  43. data/lib/bel_parser/language/version1_0/value_encodings/rna_abundance.rb +21 -0
  44. data/lib/bel_parser/language/version1_0.rb +6 -87
  45. data/lib/bel_parser/language/version2_0/functions/abundance.rb +13 -18
  46. data/lib/bel_parser/language/version2_0/functions/biological_process.rb +5 -6
  47. data/lib/bel_parser/language/version2_0/functions/complex_abundance.rb +9 -12
  48. data/lib/bel_parser/language/version2_0/functions/fragment.rb +4 -9
  49. data/lib/bel_parser/language/version2_0/functions/from_location.rb +5 -6
  50. data/lib/bel_parser/language/version2_0/functions/fusion.rb +39 -66
  51. data/lib/bel_parser/language/version2_0/functions/gene_abundance.rb +13 -18
  52. data/lib/bel_parser/language/version2_0/functions/list.rb +5 -6
  53. data/lib/bel_parser/language/version2_0/functions/location.rb +5 -6
  54. data/lib/bel_parser/language/version2_0/functions/micro_rna_abundance.rb +13 -18
  55. data/lib/bel_parser/language/version2_0/functions/molecular_activity.rb +6 -5
  56. data/lib/bel_parser/language/version2_0/functions/pathology.rb +5 -6
  57. data/lib/bel_parser/language/version2_0/functions/protein_abundance.rb +21 -30
  58. data/lib/bel_parser/language/version2_0/functions/protein_modification.rb +11 -17
  59. data/lib/bel_parser/language/version2_0/functions/rna_abundance.rb +13 -18
  60. data/lib/bel_parser/language/version2_0/functions/to_location.rb +5 -6
  61. data/lib/bel_parser/language/version2_0/functions/variant.rb +1 -4
  62. data/lib/bel_parser/language/version2_0/value_encodings/abundance.rb +21 -0
  63. data/lib/bel_parser/language/version2_0/value_encodings/activity.rb +21 -0
  64. data/lib/bel_parser/language/version2_0/value_encodings/any.rb +74 -0
  65. data/lib/bel_parser/language/version2_0/value_encodings/biological_process.rb +21 -0
  66. data/lib/bel_parser/language/version2_0/value_encodings/complex_abundance.rb +21 -0
  67. data/lib/bel_parser/language/version2_0/value_encodings/gene_abundance.rb +21 -0
  68. data/lib/bel_parser/language/version2_0/value_encodings/location.rb +21 -0
  69. data/lib/bel_parser/language/version2_0/value_encodings/micro_rna_abundance.rb +21 -0
  70. data/lib/bel_parser/language/version2_0/value_encodings/pathology.rb +21 -0
  71. data/lib/bel_parser/language/version2_0/value_encodings/protein_abundance.rb +21 -0
  72. data/lib/bel_parser/language/version2_0/value_encodings/protein_modification.rb +21 -0
  73. data/lib/bel_parser/language/version2_0/value_encodings/rna_abundance.rb +21 -0
  74. data/lib/bel_parser/language/version2_0.rb +6 -60
  75. data/lib/bel_parser/language.rb +3 -4
  76. data/lib/bel_parser/parsers/ast/node.rb +14 -2
  77. data/lib/bel_parser/{language/quoting.rb → quoting.rb} +0 -56
  78. data/lib/bel_parser/resource/concept.rb +56 -0
  79. data/lib/bel_parser/resource/concept_scheme.rb +35 -0
  80. data/lib/bel_parser/resource/dataset.rb +34 -0
  81. data/lib/bel_parser/resource/eager_reader.rb +75 -0
  82. data/lib/bel_parser/resource/eager_sparql_reader.rb +51 -0
  83. data/lib/bel_parser/resource/http_cache.rb +71 -0
  84. data/lib/bel_parser/resource/jena_tdb_reader.rb +246 -0
  85. data/lib/bel_parser/resource/lru_cache.rb +111 -0
  86. data/lib/bel_parser/resource/lru_reader.rb +38 -0
  87. data/lib/bel_parser/resource/reader.rb +18 -0
  88. data/lib/bel_parser/resource/resource_file_reader.rb +134 -0
  89. data/lib/bel_parser/resource/sparql_reader.rb +178 -0
  90. data/lib/bel_parser/resource/value.rb +31 -0
  91. metadata +42 -4
  92. data/lib/bel_parser/language/version1_0/syntax/function.rb +0 -28
@@ -15,6 +15,9 @@ module BELParser
15
15
  SHORT = :fus
16
16
  LONG = :fusion
17
17
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::Fusion
18
+ G_ENC = Version2_0::ValueEncodings::GeneAbundance
19
+ P_ENC = Version2_0::ValueEncodings::ProteinAbundance
20
+ R_ENC = Version2_0::ValueEncodings::RNAAbundance
18
21
  DESCRIPTION = 'Specifies the abundance of a protein translated
19
22
  rom the fusion of a gene.'.freeze
20
23
 
@@ -53,37 +56,27 @@ module BELParser
53
56
  argument(
54
57
  parameter(
55
58
  prefix(
56
- identifier(
57
- has_namespace,
58
- namespace_of(:*))),
59
+ has_namespace,
60
+ namespace_of(:*)),
59
61
  value(
60
- value_type(
61
- has_encoding,
62
- encoding_of(:GeneAbundance))))),
62
+ has_encoding,
63
+ encoding_of(G_ENC)))),
63
64
  argument(
64
65
  parameter(
65
- prefix(
66
- any),
67
- value(
68
- value_type(
69
- encoding_of(:*))))),
66
+ prefix(any),
67
+ value(any))),
70
68
  argument(
71
69
  parameter(
72
70
  prefix(
73
- identifier(
74
- has_namespace,
75
- namespace_of(:*))),
71
+ has_namespace,
72
+ namespace_of(:*)),
76
73
  value(
77
- value_type(
78
- has_encoding,
79
- encoding_of(:GeneAbundance))))),
74
+ has_encoding,
75
+ encoding_of(G_ENC)))),
80
76
  argument(
81
77
  parameter(
82
- prefix(
83
- any),
84
- value(
85
- value_type(
86
- encoding_of(:*))))))
78
+ prefix(any),
79
+ value(any))))
87
80
  end
88
81
  private_constant :AST
89
82
 
@@ -113,37 +106,27 @@ module BELParser
113
106
  argument(
114
107
  parameter(
115
108
  prefix(
116
- identifier(
117
- has_namespace,
118
- namespace_of(:*))),
109
+ has_namespace,
110
+ namespace_of(:*)),
119
111
  value(
120
- value_type(
121
- has_encoding,
122
- encoding_of(:ProteinAbundance))))),
112
+ has_encoding,
113
+ encoding_of(P_ENC)))),
123
114
  argument(
124
115
  parameter(
125
- prefix(
126
- any),
127
- value(
128
- value_type(
129
- encoding_of(:*))))),
116
+ prefix(any),
117
+ value(any))),
130
118
  argument(
131
119
  parameter(
132
120
  prefix(
133
- identifier(
134
- has_namespace,
135
- namespace_of(:*))),
121
+ has_namespace,
122
+ namespace_of(:*)),
136
123
  value(
137
- value_type(
138
- has_encoding,
139
- encoding_of(:ProteinAbundance))))),
124
+ has_encoding,
125
+ encoding_of(P_ENC)))),
140
126
  argument(
141
127
  parameter(
142
- prefix(
143
- any),
144
- value(
145
- value_type(
146
- encoding_of(:*))))))
128
+ prefix(any),
129
+ value(any))))
147
130
  end
148
131
  private_constant :AST
149
132
 
@@ -173,37 +156,27 @@ module BELParser
173
156
  argument(
174
157
  parameter(
175
158
  prefix(
176
- identifier(
177
- has_namespace,
178
- namespace_of(:*))),
159
+ has_namespace,
160
+ namespace_of(:*)),
179
161
  value(
180
- value_type(
181
- has_encoding,
182
- encoding_of(:RnaAbundance))))),
162
+ has_encoding,
163
+ encoding_of(R_ENC)))),
183
164
  argument(
184
165
  parameter(
185
- prefix(
186
- any),
187
- value(
188
- value_type(
189
- encoding_of(:*))))),
166
+ prefix(any),
167
+ value(any))),
190
168
  argument(
191
169
  parameter(
192
170
  prefix(
193
- identifier(
194
- has_namespace,
195
- namespace_of(:*))),
171
+ has_namespace,
172
+ namespace_of(:*)),
196
173
  value(
197
- value_type(
198
- has_encoding,
199
- encoding_of(:RnaAbundance))))),
174
+ has_encoding,
175
+ encoding_of(R_ENC)))),
200
176
  argument(
201
177
  parameter(
202
- prefix(
203
- any),
204
- value(
205
- value_type(
206
- encoding_of(:*))))))
178
+ prefix(any),
179
+ value(any))))
207
180
  end
208
181
  private_constant :AST
209
182
 
@@ -14,6 +14,7 @@ module BELParser
14
14
  SHORT = :g
15
15
  LONG = :geneAbundance
16
16
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::GeneAbundance
17
+ G_ENC = Version2_0::ValueEncodings::GeneAbundance
17
18
  DESCRIPTION = 'Denotes the abundance of a gene.'.freeze
18
19
 
19
20
  def self.short
@@ -51,13 +52,11 @@ module BELParser
51
52
  argument(
52
53
  parameter(
53
54
  prefix(
54
- identifier(
55
- has_namespace,
56
- namespace_of(:*))),
55
+ has_namespace,
56
+ namespace_of(:*)),
57
57
  value(
58
- value_type(
59
- has_encoding,
60
- encoding_of(:GeneAbundance))))))
58
+ has_encoding,
59
+ encoding_of(G_ENC)))))
61
60
  end
62
61
  private_constant :AST
63
62
 
@@ -118,13 +117,11 @@ module BELParser
118
117
  argument(
119
118
  parameter(
120
119
  prefix(
121
- identifier(
122
- has_namespace,
123
- namespace_of(:*))),
120
+ has_namespace,
121
+ namespace_of(:*)),
124
122
  value(
125
- value_type(
126
- has_encoding,
127
- encoding_of(:Abundance))))),
123
+ has_encoding,
124
+ encoding_of(G_ENC)))),
128
125
  argument(
129
126
  term(
130
127
  function(
@@ -159,13 +156,11 @@ module BELParser
159
156
  argument(
160
157
  parameter(
161
158
  prefix(
162
- identifier(
163
- has_namespace,
164
- namespace_of(:*))),
159
+ has_namespace,
160
+ namespace_of(:*)),
165
161
  value(
166
- value_type(
167
- has_encoding,
168
- encoding_of(:GeneAbundance))))),
162
+ has_encoding,
163
+ encoding_of(G_ENC)))),
169
164
  argument(
170
165
  term(
171
166
  function(
@@ -14,6 +14,7 @@ module BELParser
14
14
  SHORT = :list
15
15
  LONG = :list
16
16
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::List
17
+ A_ENC = Version2_0::ValueEncodings::Abundance
17
18
  DESCRIPTION = 'Groups a list of terms together.'.freeze
18
19
 
19
20
  def self.short
@@ -51,13 +52,11 @@ module BELParser
51
52
  argument(
52
53
  parameter(
53
54
  prefix(
54
- identifier(
55
- has_namespace,
56
- namespace_of(:*))),
55
+ has_namespace,
56
+ namespace_of(:*)),
57
57
  value(
58
- value_type(
59
- has_encoding,
60
- encoding_of(:Abundance))))))
58
+ has_encoding,
59
+ encoding_of(A_ENC)))))
61
60
  end
62
61
  private_constant :AST
63
62
 
@@ -14,6 +14,7 @@ module BELParser
14
14
  SHORT = :loc
15
15
  LONG = :location
16
16
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::Location
17
+ L_ENC = Version2_0::ValueEncodings::Location
17
18
  DESCRIPTION = 'Denotes the cellular location of the abundance.'.freeze
18
19
 
19
20
  def self.short
@@ -51,13 +52,11 @@ module BELParser
51
52
  argument(
52
53
  parameter(
53
54
  prefix(
54
- identifier(
55
- has_namespace,
56
- namespace_of(:*))),
55
+ has_namespace,
56
+ namespace_of(:*)),
57
57
  value(
58
- value_type(
59
- has_encoding,
60
- encoding_of(:Location))))))
58
+ has_encoding,
59
+ encoding_of(L_ENC)))))
61
60
  end
62
61
  private_constant :AST
63
62
 
@@ -15,6 +15,7 @@ module BELParser
15
15
  SHORT = :m
16
16
  LONG = :microRNAAbundance
17
17
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::MicroRNAAbundance
18
+ M_ENC = Version2_0::ValueEncodings::MicroRNAAbundance
18
19
  DESCRIPTION = 'Denotes the abundance of a processed, functional
19
20
  icroRNA'.freeze
20
21
 
@@ -53,13 +54,11 @@ module BELParser
53
54
  argument(
54
55
  parameter(
55
56
  prefix(
56
- identifier(
57
- has_namespace,
58
- namespace_of(:*))),
57
+ has_namespace,
58
+ namespace_of(:*)),
59
59
  value(
60
- value_type(
61
- has_encoding,
62
- encoding_of(:MicroRNAAbundance))))))
60
+ has_encoding,
61
+ encoding_of(M_ENC)))))
63
62
  end
64
63
  private_constant :AST
65
64
 
@@ -89,13 +88,11 @@ module BELParser
89
88
  argument(
90
89
  parameter(
91
90
  prefix(
92
- identifier(
93
- has_namespace,
94
- namespace_of(:*))),
91
+ has_namespace,
92
+ namespace_of(:*)),
95
93
  value(
96
- value_type(
97
- has_encoding,
98
- encoding_of(:MicroRNAAbundance))))),
94
+ has_encoding,
95
+ encoding_of(M_ENC)))),
99
96
  argument(
100
97
  term(
101
98
  function(
@@ -130,13 +127,11 @@ module BELParser
130
127
  argument(
131
128
  parameter(
132
129
  prefix(
133
- identifier(
134
- has_namespace,
135
- namespace_of(:*))),
130
+ has_namespace,
131
+ namespace_of(:*)),
136
132
  value(
137
- value_type(
138
- has_encoding,
139
- encoding_of(:MicroRNAAbundance))))),
133
+ has_encoding,
134
+ encoding_of(M_ENC)))),
140
135
  argument(
141
136
  term(
142
137
  function(
@@ -15,6 +15,7 @@ module BELParser
15
15
  SHORT = :ma
16
16
  LONG = :molecularActivity
17
17
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::MolecularActivity
18
+ T_ENC = Version2_0::ValueEncodings::Activity
18
19
  DESCRIPTION = 'Denotes the frequency or abundance of events
19
20
  n which a member acts as a causal agent at the
20
21
  olecular scale'.freeze
@@ -46,7 +47,6 @@ module BELParser
46
47
 
47
48
  private_class_method :new
48
49
 
49
- # TODO: More constraints on prefix for activity namespace?
50
50
  AST = BELParser::Language::Semantics::Builder.build do
51
51
  term(
52
52
  function(
@@ -54,11 +54,12 @@ module BELParser
54
54
  function_of(MolecularActivity))),
55
55
  argument(
56
56
  parameter(
57
- prefix(any),
57
+ prefix(
58
+ has_namespace,
59
+ namespace_of(:*)),
58
60
  value(
59
- value_type(
60
- has_encoding,
61
- encoding_of(:Activity))))))
61
+ has_encoding,
62
+ encoding_of(T_ENC)))))
62
63
  end
63
64
  private_constant :AST
64
65
 
@@ -14,6 +14,7 @@ module BELParser
14
14
  SHORT = :path
15
15
  LONG = :pathology
16
16
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::Pathology
17
+ O_ENC = Version2_0::ValueEncodings::Pathology
17
18
  DESCRIPTION = 'Denotes a disease or pathology process'.freeze
18
19
 
19
20
  def self.short
@@ -51,13 +52,11 @@ module BELParser
51
52
  argument(
52
53
  parameter(
53
54
  prefix(
54
- identifier(
55
- has_namespace,
56
- namespace_of(:*))),
55
+ has_namespace,
56
+ namespace_of(:*)),
57
57
  value(
58
- value_type(
59
- has_encoding,
60
- encoding_of(:Pathology))))))
58
+ has_encoding,
59
+ encoding_of(O_ENC)))))
61
60
  end
62
61
  private_constant :AST
63
62
 
@@ -14,6 +14,7 @@ module BELParser
14
14
  SHORT = :p
15
15
  LONG = :proteinAbundance
16
16
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::ProteinAbundance
17
+ P_ENC = Version2_0::ValueEncodings::ProteinAbundance
17
18
  DESCRIPTION = 'Denotes the abundance of a protein'.freeze
18
19
 
19
20
  def self.short
@@ -51,13 +52,11 @@ module BELParser
51
52
  argument(
52
53
  parameter(
53
54
  prefix(
54
- identifier(
55
- has_namespace,
56
- namespace_of(:*))),
55
+ has_namespace,
56
+ namespace_of(:*)),
57
57
  value(
58
- value_type(
59
- has_encoding,
60
- encoding_of(:ProteinAbundance))))))
58
+ has_encoding,
59
+ encoding_of(P_ENC)))))
61
60
  end
62
61
  private_constant :AST
63
62
 
@@ -87,13 +86,11 @@ module BELParser
87
86
  argument(
88
87
  parameter(
89
88
  prefix(
90
- identifier(
91
- has_namespace,
92
- namespace_of(:*))),
89
+ has_namespace,
90
+ namespace_of(:*)),
93
91
  value(
94
- value_type(
95
- has_encoding,
96
- encoding_of(:ProteinAbundance))))),
92
+ has_encoding,
93
+ encoding_of(P_ENC)))),
97
94
  argument(
98
95
  term(
99
96
  function(
@@ -159,13 +156,11 @@ module BELParser
159
156
  argument(
160
157
  parameter(
161
158
  prefix(
162
- identifier(
163
- has_namespace,
164
- namespace_of(:*))),
159
+ has_namespace,
160
+ namespace_of(:*)),
165
161
  value(
166
- value_type(
167
- has_encoding,
168
- encoding_of(:ProteinAbundance))))),
162
+ has_encoding,
163
+ encoding_of(P_ENC)))),
169
164
  argument(
170
165
  term(
171
166
  function(
@@ -200,13 +195,11 @@ module BELParser
200
195
  argument(
201
196
  parameter(
202
197
  prefix(
203
- identifier(
204
- has_namespace,
205
- namespace_of(:*))),
198
+ has_namespace,
199
+ namespace_of(:*)),
206
200
  value(
207
- value_type(
208
- has_encoding,
209
- encoding_of(:ProteinAbundance))))),
201
+ has_encoding,
202
+ encoding_of(P_ENC)))),
210
203
  variadic_arguments(
211
204
  term(
212
205
  function(
@@ -241,13 +234,11 @@ module BELParser
241
234
  argument(
242
235
  parameter(
243
236
  prefix(
244
- identifier(
245
- has_namespace,
246
- namespace_of(:*))),
237
+ has_namespace,
238
+ namespace_of(:*)),
247
239
  value(
248
- value_type(
249
- has_encoding,
250
- encoding_of(:ProteinAbundance))))),
240
+ has_encoding,
241
+ encoding_of(P_ENC)))),
251
242
  argument(
252
243
  term(
253
244
  function(
@@ -15,8 +15,8 @@ module BELParser
15
15
 
16
16
  SHORT = :pmod
17
17
  LONG = :proteinModification
18
- RETURN_TYPE =
19
- BELParser::Language::Version2_0::ReturnTypes::ProteinModification
18
+ RETURN_TYPE = Version2_0::ReturnTypes::ProteinModification
19
+ E_ENC = Version2_0::ValueEncodings::ProteinModification
20
20
  DESCRIPTION = 'Denotes a covalently modified protein
21
21
  bundance'.freeze
22
22
 
@@ -57,9 +57,8 @@ module BELParser
57
57
  parameter(
58
58
  prefix(any),
59
59
  value(
60
- value_type(
61
- has_encoding,
62
- encoding_of(:ModificationType))))))
60
+ has_encoding,
61
+ encoding_of(E_ENC)))))
63
62
  end
64
63
  private_constant :AST
65
64
 
@@ -93,15 +92,13 @@ module BELParser
93
92
  parameter(
94
93
  prefix(any),
95
94
  value(
96
- value_type(
97
- has_encoding,
98
- encoding_of(:ModificationType))))),
95
+ has_encoding,
96
+ encoding_of(E_ENC)))),
99
97
  argument(
100
98
  parameter(
101
99
  prefix(any),
102
100
  value(
103
- value_type(
104
- amino_acid_of(*AminoAcid.values))))))
101
+ amino_acid_of(*AminoAcid.values)))))
105
102
  end
106
103
  private_constant :AST
107
104
 
@@ -135,21 +132,18 @@ module BELParser
135
132
  parameter(
136
133
  prefix(any),
137
134
  value(
138
- value_type(
139
- has_encoding,
140
- encoding_of(:ModificationType))))),
135
+ has_encoding,
136
+ encoding_of(E_ENC)))),
141
137
  argument(
142
138
  parameter(
143
139
  prefix(any),
144
140
  value(
145
- value_type(
146
- amino_acid_of(*AminoAcid.values))))),
141
+ amino_acid_of(*AminoAcid.values)))),
147
142
  argument(
148
143
  parameter(
149
144
  prefix(any),
150
145
  value(
151
- value_type(
152
- is_sequence_position)))))
146
+ is_sequence_position))))
153
147
  end
154
148
  private_constant :AST
155
149
 
@@ -14,6 +14,7 @@ module BELParser
14
14
  SHORT = :r
15
15
  LONG = :rnaAbundance
16
16
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::GeneAbundance
17
+ R_ENC = Version2_0::ValueEncodings::RNAAbundance
17
18
  DESCRIPTION = 'Denotes the abundance of a gene'.freeze
18
19
 
19
20
  def self.short
@@ -51,13 +52,11 @@ module BELParser
51
52
  argument(
52
53
  parameter(
53
54
  prefix(
54
- identifier(
55
- has_namespace,
56
- namespace_of(:*))),
55
+ has_namespace,
56
+ namespace_of(:*)),
57
57
  value(
58
- value_type(
59
- has_encoding,
60
- encoding_of(:RnaAbundance))))))
58
+ has_encoding,
59
+ encoding_of(R_ENC)))))
61
60
  end
62
61
  private_constant :AST
63
62
 
@@ -118,13 +117,11 @@ module BELParser
118
117
  argument(
119
118
  parameter(
120
119
  prefix(
121
- identifier(
122
- has_namespace,
123
- namespace_of(:*))),
120
+ has_namespace,
121
+ namespace_of(:*)),
124
122
  value(
125
- value_type(
126
- has_encoding,
127
- encoding_of(:RnaAbundance))))),
123
+ has_encoding,
124
+ encoding_of(R_ENC)))),
128
125
  argument(
129
126
  term(
130
127
  function(
@@ -159,13 +156,11 @@ module BELParser
159
156
  argument(
160
157
  parameter(
161
158
  prefix(
162
- identifier(
163
- has_namespace,
164
- namespace_of(:*))),
159
+ has_namespace,
160
+ namespace_of(:*)),
165
161
  value(
166
- value_type(
167
- has_encoding,
168
- encoding_of(:RnaAbundance))))),
162
+ has_encoding,
163
+ encoding_of(R_ENC)))),
169
164
  argument(
170
165
  term(
171
166
  function(
@@ -14,6 +14,7 @@ module BELParser
14
14
  SHORT = :toLoc
15
15
  LONG = :toLocation
16
16
  RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::ToLocation
17
+ L_ENC = Version2_0::ValueEncodings::Location
17
18
  DESCRIPTION = 'Denotes the to cellular location of the
18
19
  bundance.'.freeze
19
20
 
@@ -52,13 +53,11 @@ module BELParser
52
53
  argument(
53
54
  parameter(
54
55
  prefix(
55
- identifier(
56
- has_namespace,
57
- namespace_of(:*))),
56
+ has_namespace,
57
+ namespace_of(:*)),
58
58
  value(
59
- value_type(
60
- has_encoding,
61
- encoding_of(:Location))))))
59
+ has_encoding,
60
+ encoding_of(L_ENC)))))
62
61
  end
63
62
  private_constant :AST
64
63
 
@@ -53,10 +53,7 @@ module BELParser
53
53
  argument(
54
54
  parameter(
55
55
  prefix(any),
56
- value(
57
- value_type(
58
- has_encoding,
59
- encoding_of(:HgvsVariantDescription))))))
56
+ value(any))))
60
57
  end
61
58
  private_constant :AST
62
59