bel_parser 1.0.8-java → 1.1.1-java
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/{.gemspec-java → .gemspec} +11 -4
- data/VERSION +1 -1
- data/bin/bel2_compatibility +12 -9
- data/bin/bel2_upgrade +18 -6
- data/bin/bel2_validator +6 -3
- data/bin/bel_script_reader +1 -0
- data/lib/bel_parser/completion.rb +984 -0
- data/lib/bel_parser/language/apply_namespace_encoding.rb +14 -3
- data/lib/bel_parser/language/expression_validator.rb +1 -2
- data/lib/bel_parser/language/function.rb +4 -0
- data/lib/bel_parser/language/relationship.rb +4 -0
- data/lib/bel_parser/language/semantics/function_deprecation.rb +1 -0
- data/lib/bel_parser/language/semantics/list_function_subject.rb +2 -0
- data/lib/bel_parser/language/semantics/multiple_subject_object.rb +4 -1
- data/lib/bel_parser/language/semantics/nested_statement_without_object.rb +43 -0
- data/lib/bel_parser/language/semantics/non_object_list.rb +3 -0
- data/lib/bel_parser/language/semantics/relationship_not_listable.rb +2 -0
- data/lib/bel_parser/language/semantics/signature_mapping.rb +2 -0
- data/lib/bel_parser/language/semantics_ast.rb +0 -7
- data/lib/bel_parser/language/syntax/invalid_function.rb +6 -1
- data/lib/bel_parser/language/syntax/invalid_relationship.rb +1 -0
- data/lib/bel_parser/language/version1_0/relationships/acts_in.rb +9 -9
- data/lib/bel_parser/language/version1_0/relationships/analogous.rb +6 -4
- data/lib/bel_parser/language/version1_0/relationships/association.rb +8 -7
- data/lib/bel_parser/language/version1_0/relationships/biomarker_for.rb +6 -5
- data/lib/bel_parser/language/version1_0/relationships/causes_no_change.rb +8 -7
- data/lib/bel_parser/language/version1_0/relationships/decreases.rb +13 -12
- data/lib/bel_parser/language/version1_0/relationships/directly_decreases.rb +8 -6
- data/lib/bel_parser/language/version1_0/relationships/directly_increases.rb +8 -6
- data/lib/bel_parser/language/version1_0/relationships/has_component.rb +14 -14
- data/lib/bel_parser/language/version1_0/relationships/has_components.rb +12 -11
- data/lib/bel_parser/language/version1_0/relationships/has_member.rb +10 -8
- data/lib/bel_parser/language/version1_0/relationships/has_members.rb +12 -11
- data/lib/bel_parser/language/version1_0/relationships/has_modification.rb +9 -7
- data/lib/bel_parser/language/version1_0/relationships/has_product.rb +10 -8
- data/lib/bel_parser/language/version1_0/relationships/has_variant.rb +9 -7
- data/lib/bel_parser/language/version1_0/relationships/includes.rb +11 -10
- data/lib/bel_parser/language/version1_0/relationships/increases.rb +12 -13
- data/lib/bel_parser/language/version1_0/relationships/is_a.rb +10 -8
- data/lib/bel_parser/language/version1_0/relationships/negative_correlation.rb +9 -7
- data/lib/bel_parser/language/version1_0/relationships/orthologous.rb +9 -8
- data/lib/bel_parser/language/version1_0/relationships/positive_correlation.rb +8 -5
- data/lib/bel_parser/language/version1_0/relationships/prognostic_biomarker_for.rb +8 -6
- data/lib/bel_parser/language/version1_0/relationships/rate_limiting_step_of.rb +10 -9
- data/lib/bel_parser/language/version1_0/relationships/reactant_in.rb +10 -8
- data/lib/bel_parser/language/version1_0/relationships/sub_process_of.rb +13 -12
- data/lib/bel_parser/language/version1_0/relationships/transcribed_to.rb +8 -7
- data/lib/bel_parser/language/version1_0/relationships/translated_to.rb +9 -7
- data/lib/bel_parser/language/version1_0/relationships/translocates.rb +10 -9
- data/lib/bel_parser/language/version2_0/functions/protein_modification.rb +1 -2
- data/lib/bel_parser/language/version2_0/functions/translocation.rb +1 -2
- data/lib/bel_parser/language/version2_0/functions/variant.rb +1 -2
- data/lib/bel_parser/language/version2_0/relationships/acts_in.rb +10 -9
- data/lib/bel_parser/language/version2_0/relationships/biomarker_for.rb +7 -5
- data/lib/bel_parser/language/version2_0/relationships/causes_no_change.rb +9 -7
- data/lib/bel_parser/language/version2_0/relationships/decreases.rb +13 -12
- data/lib/bel_parser/language/version2_0/relationships/directly_decreases.rb +8 -6
- data/lib/bel_parser/language/version2_0/relationships/directly_increases.rb +8 -6
- data/lib/bel_parser/language/version2_0/relationships/has_component.rb +15 -14
- data/lib/bel_parser/language/version2_0/relationships/has_components.rb +12 -11
- data/lib/bel_parser/language/version2_0/relationships/has_member.rb +9 -8
- data/lib/bel_parser/language/version2_0/relationships/has_members.rb +12 -11
- data/lib/bel_parser/language/version2_0/relationships/has_modification.rb +9 -7
- data/lib/bel_parser/language/version2_0/relationships/has_product.rb +10 -8
- data/lib/bel_parser/language/version2_0/relationships/has_variant.rb +9 -7
- data/lib/bel_parser/language/version2_0/relationships/includes.rb +11 -10
- data/lib/bel_parser/language/version2_0/relationships/increases.rb +13 -12
- data/lib/bel_parser/language/version2_0/relationships/is_a.rb +10 -8
- data/lib/bel_parser/language/version2_0/relationships/negative_correlation.rb +9 -7
- data/lib/bel_parser/language/version2_0/relationships/orthologous.rb +10 -8
- data/lib/bel_parser/language/version2_0/relationships/positive_correlation.rb +7 -5
- data/lib/bel_parser/language/version2_0/relationships/prognostic_biomarker_for.rb +8 -6
- data/lib/bel_parser/language/version2_0/relationships/rate_limiting_step_of.rb +10 -9
- data/lib/bel_parser/language/version2_0/relationships/reactant_in.rb +10 -8
- data/lib/bel_parser/language/version2_0/relationships/regulates.rb +9 -8
- data/lib/bel_parser/language/version2_0/relationships/sub_process_of.rb +13 -12
- data/lib/bel_parser/language/version2_0/relationships/transcribed_to.rb +8 -7
- data/lib/bel_parser/language/version2_0/relationships/translated_to.rb +9 -7
- data/lib/bel_parser/language/version2_0/relationships/translocates.rb +10 -9
- data/lib/bel_parser/mixin/levenshtein.rb +20 -0
- data/lib/bel_parser/parsers/ast/node.rb +49 -2
- data/lib/bel_parser/parsers/bel_script/define_annotation.rb +156 -156
- data/lib/bel_parser/parsers/bel_script/define_namespace.rb +60 -60
- data/lib/bel_parser/parsers/bel_script/set.rb +200 -200
- data/lib/bel_parser/parsers/bel_script/set_document.rb +188 -188
- data/lib/bel_parser/parsers/bel_script/unset.rb +14 -14
- data/lib/bel_parser/parsers/common/common.rl +1 -0
- data/lib/bel_parser/parsers/common/function.rb +8 -8
- data/lib/bel_parser/parsers/common/function.rl +6 -6
- data/lib/bel_parser/parsers/common/identifier.rb +3 -3
- data/lib/bel_parser/parsers/common/identifier.rl +4 -4
- data/lib/bel_parser/parsers/common/list.rb +78 -78
- data/lib/bel_parser/parsers/common/multi_identifier.rb +275 -0
- data/lib/bel_parser/parsers/common/multi_identifier.rl +141 -0
- data/lib/bel_parser/parsers/common/string.rb +6 -6
- data/lib/bel_parser/parsers/common/string.rl +4 -4
- data/lib/bel_parser/parsers/common.rb +1 -0
- data/lib/bel_parser/parsers/expression/nested_statement.rb +30180 -29055
- data/lib/bel_parser/parsers/expression/observed_term.rb +1456 -1099
- data/lib/bel_parser/parsers/expression/parameter.rb +192 -111
- data/lib/bel_parser/parsers/expression/parameter.rl +6 -3
- data/lib/bel_parser/parsers/expression/relationship.rb +43 -19
- data/lib/bel_parser/parsers/expression/relationship.rl +1 -0
- data/lib/bel_parser/parsers/expression/simple_statement.rb +17805 -17093
- data/lib/bel_parser/parsers/expression/statement_autocomplete.rb +1035 -0
- data/lib/bel_parser/parsers/expression/statement_autocomplete.rl +736 -0
- data/lib/bel_parser/parsers/expression/term.rb +960 -705
- data/lib/bel_parser/parsers/serializer.rb +8 -4
- data/lib/bel_parser/version.rb +33 -0
- data/lib/bel_parser.rb +3 -0
- metadata +26 -4
|
@@ -69,11 +69,11 @@ module BELParser
|
|
|
69
69
|
|
|
70
70
|
def on_value(value_node)
|
|
71
71
|
return value_node unless @namespace
|
|
72
|
+
|
|
72
73
|
value_node.prefix = @prefix
|
|
73
74
|
value_node.namespace = @namespace
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
value = @namespace[value_literal]
|
|
75
|
+
string_literal = value_literal(value_node.children[0])
|
|
76
|
+
value = @namespace[string_literal]
|
|
77
77
|
|
|
78
78
|
if value
|
|
79
79
|
value_node.encoding =
|
|
@@ -86,6 +86,17 @@ module BELParser
|
|
|
86
86
|
end
|
|
87
87
|
value_node
|
|
88
88
|
end
|
|
89
|
+
|
|
90
|
+
private
|
|
91
|
+
|
|
92
|
+
def value_literal(node)
|
|
93
|
+
case node.type
|
|
94
|
+
when :identifier
|
|
95
|
+
node.string_literal
|
|
96
|
+
when :string
|
|
97
|
+
node.string_value
|
|
98
|
+
end
|
|
99
|
+
end
|
|
89
100
|
end
|
|
90
101
|
end
|
|
91
102
|
end
|
|
@@ -123,7 +123,7 @@ module BELParser
|
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
def semantics_errors_s
|
|
126
|
-
return nil if @semantics_results.empty?
|
|
126
|
+
return nil if @semantics_results.nil? || @semantics_results.empty?
|
|
127
127
|
|
|
128
128
|
report = "Semantic errors\n"
|
|
129
129
|
@semantics_results.each { |res| report += "#{res}\n" }
|
|
@@ -406,7 +406,6 @@ module BELParser
|
|
|
406
406
|
end
|
|
407
407
|
|
|
408
408
|
def to_s
|
|
409
|
-
report = @object_result.to_s
|
|
410
409
|
<<-HEADER.gsub(/^ {12}/, '')
|
|
411
410
|
Syntax: #{valid_syntax? ? 'Valid' : 'Invalid'}
|
|
412
411
|
Semantics: #{valid_semantics? ? 'Valid' : 'Invalid'}
|
|
@@ -14,6 +14,7 @@ module BELParser
|
|
|
14
14
|
|
|
15
15
|
def self.map(node, spec, _namespaces)
|
|
16
16
|
return nil unless node.is_a?(BELParser::Parsers::AST::Function)
|
|
17
|
+
return nil unless node.identifier
|
|
17
18
|
|
|
18
19
|
function_name = node.identifier.string_literal
|
|
19
20
|
func = spec.function(function_name.to_sym)
|
|
@@ -19,6 +19,8 @@ module BELParser
|
|
|
19
19
|
list_func = spec.function(:list)
|
|
20
20
|
return nil unless list_func
|
|
21
21
|
|
|
22
|
+
return nil unless node.term.function
|
|
23
|
+
return nil unless node.term.function.identifier
|
|
22
24
|
func_name = node.term.function.identifier.string_literal
|
|
23
25
|
sub_func = spec.function(func_name.to_sym)
|
|
24
26
|
ListFunctionSubjectWarning.new(node, spec) if sub_func == list_func
|
|
@@ -13,6 +13,7 @@ module BELParser
|
|
|
13
13
|
|
|
14
14
|
def self.map(stmt_node, spec, _namespaces)
|
|
15
15
|
return nil unless stmt_node.is_a?(BELParser::Parsers::AST::Statement)
|
|
16
|
+
return nil unless stmt_node.relationship?
|
|
16
17
|
return nil if stmt_node.relationship.string_literal.nil?
|
|
17
18
|
rel = spec.relationship(stmt_node.relationship.string_literal.to_sym)
|
|
18
19
|
return nil unless rel
|
|
@@ -20,6 +21,7 @@ module BELParser
|
|
|
20
21
|
|
|
21
22
|
list_func = spec.function(:list)
|
|
22
23
|
return nil unless list_func
|
|
24
|
+
return nil unless stmt_node.object?
|
|
23
25
|
return nil unless stmt_node.object.term?
|
|
24
26
|
|
|
25
27
|
map_subject_object(stmt_node, rel, spec)
|
|
@@ -29,7 +31,8 @@ module BELParser
|
|
|
29
31
|
sub_term = stmt_node.subject.term
|
|
30
32
|
list_term = stmt_node.object.child
|
|
31
33
|
|
|
32
|
-
if list_term.arguments.
|
|
34
|
+
return nil if list_term.arguments.empty?
|
|
35
|
+
if list_term.arguments.any? { |arg| arg.child && sub_term == arg.child }
|
|
33
36
|
MultipleSubjectObjectWarning.new(stmt_node, spec, rel)
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
require 'bel_parser/parsers/ast/node'
|
|
2
|
+
|
|
3
|
+
module BELParser
|
|
4
|
+
module Language
|
|
5
|
+
module Semantics
|
|
6
|
+
# NestedStatementWithoutObject implements a {SemanticsFunction} that maps a
|
|
7
|
+
# nested {BELParser::Parsers::AST::Statement} to {SemanticsWarning} if
|
|
8
|
+
# the nested statement does not have an object.
|
|
9
|
+
class NestedStatementWithoutObject
|
|
10
|
+
include SemanticsFunction
|
|
11
|
+
|
|
12
|
+
private_class_method :new
|
|
13
|
+
|
|
14
|
+
def self.map(node, spec, _namespaces)
|
|
15
|
+
return nil unless node.is_a?(BELParser::Parsers::AST::Statement)
|
|
16
|
+
return nil unless node.object? && node.object.statement?
|
|
17
|
+
|
|
18
|
+
nested = node.object.child
|
|
19
|
+
|
|
20
|
+
if nested.object?
|
|
21
|
+
NestedStatementWithoutObjectWarning.new(node, spec)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Represents a {SemanticsWarning} when a nested
|
|
27
|
+
# {BELParser::Parsers::AST::Statement} does not have an object.
|
|
28
|
+
class NestedStatementWithoutObjectWarning < SemanticsWarning
|
|
29
|
+
attr_reader :non_causal_relationship
|
|
30
|
+
|
|
31
|
+
def initialize(stmt_node, spec)
|
|
32
|
+
super(stmt_node, spec)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def to_s
|
|
36
|
+
<<-MSG.gsub(/ {12}/, '')
|
|
37
|
+
Nested statement does not have an object.
|
|
38
|
+
MSG
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -13,6 +13,8 @@ module BELParser
|
|
|
13
13
|
|
|
14
14
|
def self.map(stmt_node, spec, _namespaces)
|
|
15
15
|
return nil unless stmt_node.is_a?(BELParser::Parsers::AST::Statement)
|
|
16
|
+
return nil unless stmt_node.relationship?
|
|
17
|
+
return nil unless stmt_node.object?
|
|
16
18
|
return nil if stmt_node.relationship.string_literal.nil?
|
|
17
19
|
|
|
18
20
|
list_func = spec.function(:list)
|
|
@@ -31,6 +33,7 @@ module BELParser
|
|
|
31
33
|
spec,
|
|
32
34
|
rel) unless obj_node.term?
|
|
33
35
|
|
|
36
|
+
return nil unless obj_node.child.function
|
|
34
37
|
obj_func = obj_node.child.function.identifier.string_literal
|
|
35
38
|
NonObjectListWarning.new(
|
|
36
39
|
obj_node,
|
|
@@ -14,6 +14,7 @@ module BELParser
|
|
|
14
14
|
def self.map(node, spec, _namespaces)
|
|
15
15
|
return nil unless node.is_a?(BELParser::Parsers::AST::Statement)
|
|
16
16
|
return nil unless node.relationship?
|
|
17
|
+
return nil unless node.object?
|
|
17
18
|
return nil unless node.object.term?
|
|
18
19
|
|
|
19
20
|
map_statement(node, spec)
|
|
@@ -22,6 +23,7 @@ module BELParser
|
|
|
22
23
|
def self.map_statement(stmt_node, spec)
|
|
23
24
|
list_func = spec.function(:list)
|
|
24
25
|
return nil unless list_func
|
|
26
|
+
return nil unless stmt_node.object.child.function
|
|
25
27
|
|
|
26
28
|
obj_func = stmt_node.object.child.function.identifier.string_literal
|
|
27
29
|
return nil unless spec.function(obj_func.to_sym) == list_func
|
|
@@ -19,6 +19,8 @@ module BELParser
|
|
|
19
19
|
# includes both successful and failed signature matches.
|
|
20
20
|
def self.map(term_node, spec, _namespaces)
|
|
21
21
|
return nil unless term_node.is_a?(BELParser::Parsers::AST::Term)
|
|
22
|
+
return nil unless term_node.function
|
|
23
|
+
return nil unless term_node.function.identifier
|
|
22
24
|
|
|
23
25
|
function_name = term_node.function.identifier.string_literal
|
|
24
26
|
function = spec.function(function_name.to_sym)
|
|
@@ -69,18 +69,11 @@ module BELParser
|
|
|
69
69
|
|
|
70
70
|
builder = _builder_class.new
|
|
71
71
|
builder.instance_eval(&block)
|
|
72
|
-
builder.result
|
|
73
72
|
end
|
|
74
73
|
|
|
75
74
|
def self._builder_class
|
|
76
75
|
Class.new do
|
|
77
76
|
include Builder
|
|
78
|
-
|
|
79
|
-
attr_reader :result
|
|
80
|
-
|
|
81
|
-
def term(function, *arguments, **properties)
|
|
82
|
-
@result = super
|
|
83
|
-
end
|
|
84
77
|
end
|
|
85
78
|
end
|
|
86
79
|
private_class_method :_builder_class
|
|
@@ -13,7 +13,12 @@ module BELParser
|
|
|
13
13
|
def self.map(func_node, spec, _namespaces)
|
|
14
14
|
return nil unless func_node.is_a?(BELParser::Parsers::AST::Function)
|
|
15
15
|
|
|
16
|
-
function_name =
|
|
16
|
+
function_name =
|
|
17
|
+
if func_node.identifier
|
|
18
|
+
func_node.identifier.string_literal
|
|
19
|
+
else
|
|
20
|
+
''
|
|
21
|
+
end
|
|
17
22
|
unless spec.function(function_name.to_sym)
|
|
18
23
|
InvalidFunctionSyntaxError.new(func_node, spec, function_name)
|
|
19
24
|
end
|
|
@@ -12,6 +12,7 @@ module BELParser
|
|
|
12
12
|
|
|
13
13
|
def self.map(stmt_node, spec, _namespaces)
|
|
14
14
|
return nil unless stmt_node.is_a?(BELParser::Parsers::AST::Statement)
|
|
15
|
+
return nil unless stmt_node.relationship?
|
|
15
16
|
|
|
16
17
|
rel_name = stmt_node.relationship.string_literal
|
|
17
18
|
return nil if rel_name.nil?
|
|
@@ -17,15 +17,15 @@ module BELParser
|
|
|
17
17
|
|
|
18
18
|
SHORT = :actsIn
|
|
19
19
|
LONG = :actsIn
|
|
20
|
-
DESCRIPTION =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
DESCRIPTION = <<-DOC
|
|
21
|
+
ActsIn: +A actsIn f(A)+ - This relationship links
|
|
22
|
+
an abundance term to the activity term for the same
|
|
23
|
+
abundance. This relationship is direct because it is a _self_
|
|
24
|
+
relationship, the abundance acts in its own activity. For
|
|
25
|
+
protein abundance p(A) and its molecular activity kin(p(A),
|
|
26
|
+
+p(A) actsIn kin(p(A))+. This relationship is introduced by the
|
|
27
|
+
BEL Compiler and may not be used by statements in BEL documents.
|
|
28
|
+
DOC
|
|
29
29
|
|
|
30
30
|
def self.short
|
|
31
31
|
SHORT
|
|
@@ -14,10 +14,12 @@ module BELParser
|
|
|
14
14
|
|
|
15
15
|
SHORT = :analogous
|
|
16
16
|
LONG = :analogous
|
|
17
|
-
DESCRIPTION =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
DESCRIPTION = <<-DOC
|
|
18
|
+
Analogous: +A analogous B+ - For terms A and B, +A analogousTo
|
|
19
|
+
B+ indicates that A and B represent abundances or molecular
|
|
20
|
+
activities in different species which function in a similar
|
|
21
|
+
manner.
|
|
22
|
+
DOC
|
|
21
23
|
|
|
22
24
|
def self.short
|
|
23
25
|
SHORT
|
|
@@ -16,13 +16,14 @@ module BELParser
|
|
|
16
16
|
|
|
17
17
|
SHORT = :'--'
|
|
18
18
|
LONG = :association
|
|
19
|
-
DESCRIPTION =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
DESCRIPTION = <<-DOC
|
|
20
|
+
Association: +A -- B+ - For terms A and B, +A association
|
|
21
|
+
B+ or +A -- B+ indicates that A and B are associated in an
|
|
22
|
+
unspecified manner. This relationship is used when not enough
|
|
23
|
+
information about the association is available to describe
|
|
24
|
+
it using more specific relationships, like increases or
|
|
25
|
+
positiveCorrelation.
|
|
26
|
+
DOC
|
|
26
27
|
|
|
27
28
|
def self.short
|
|
28
29
|
SHORT
|
|
@@ -14,11 +14,12 @@ module BELParser
|
|
|
14
14
|
|
|
15
15
|
SHORT = :biomarkerFor
|
|
16
16
|
LONG = :biomarkerFor
|
|
17
|
-
DESCRIPTION =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
DESCRIPTION = <<-DOC
|
|
18
|
+
BiomarkerFor: +A biomarkerFor P+ - For term A and process term
|
|
19
|
+
P, +A biomarkerFor P+ indicates that changes in or detection
|
|
20
|
+
of A is used in some way to be a biomarker for pathology or
|
|
21
|
+
biological process P.
|
|
22
|
+
DOC
|
|
22
23
|
|
|
23
24
|
def self.short
|
|
24
25
|
SHORT
|
|
@@ -16,13 +16,14 @@ module BELParser
|
|
|
16
16
|
|
|
17
17
|
SHORT = :causesNoChange
|
|
18
18
|
LONG = :causesNoChange
|
|
19
|
-
DESCRIPTION =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
DESCRIPTION = <<-DOC
|
|
20
|
+
CausesNoChange: +A causesNoChange B+ - For terms A and B,
|
|
21
|
+
+A causesNoChange B+ indicates that B was observed not to
|
|
22
|
+
change in response to changes in A. Statements using this
|
|
23
|
+
relationship correspond to cases where explicit measurement
|
|
24
|
+
of B demonstrates lack of significant change, not for cases
|
|
25
|
+
where the state of B is unknown.
|
|
26
|
+
DOC
|
|
26
27
|
|
|
27
28
|
def self.short
|
|
28
29
|
SHORT
|
|
@@ -20,18 +20,19 @@ module BELParser
|
|
|
20
20
|
|
|
21
21
|
SHORT = :'-|'
|
|
22
22
|
LONG = :decreases
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
|
|
24
|
+
DESCRIPTION = <<-DOC
|
|
25
|
+
Decreases: +A -| B+ - For terms A and B, +A decreases B or
|
|
26
|
+
A -| B+ indicates that increases in A have been observed to
|
|
27
|
+
cause decreases in B. +A decreases B+ also represents cases
|
|
28
|
+
where decreases in A have been observed to cause increases in B,
|
|
29
|
+
for example, in recording the results of gene deletion or other
|
|
30
|
+
inhibition experiments. A is a BEL Term and B is either a BEL
|
|
31
|
+
Term or a BEL Statement. The relationship does not indicate
|
|
32
|
+
that the changes in A are either necessary for changes in B,
|
|
33
|
+
nor does it indicate that changes in A are sufficient to cause
|
|
34
|
+
changes in B.
|
|
35
|
+
DOC
|
|
35
36
|
|
|
36
37
|
def self.short
|
|
37
38
|
SHORT
|
|
@@ -15,12 +15,14 @@ module BELParser
|
|
|
15
15
|
|
|
16
16
|
SHORT = :'=|'
|
|
17
17
|
LONG = :directlyDecreases
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
|
|
19
|
+
DESCRIPTION = <<-DOC
|
|
20
|
+
DirectlyDecreases: +A =| B+ - For terms A and B, +A
|
|
21
|
+
directlyDecreases B or A =| B+ indicates A decreases B and that
|
|
22
|
+
the mechanism of the causal relationship is based on physical
|
|
23
|
+
interaction of entities related to A and B. This is a direct
|
|
24
|
+
version of the decreases relationship.
|
|
25
|
+
DOC
|
|
24
26
|
|
|
25
27
|
def self.short
|
|
26
28
|
SHORT
|
|
@@ -15,12 +15,14 @@ module BELParser
|
|
|
15
15
|
|
|
16
16
|
SHORT = :'=>'
|
|
17
17
|
LONG = :directlyIncreases
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
|
|
19
|
+
DESCRIPTION = <<-DOC
|
|
20
|
+
DirectlyIncreases: +A => B+ - For terms A and B, +A
|
|
21
|
+
directlyIncreases B or A => B+ indicate A increases B and that
|
|
22
|
+
the mechanism of the causal relationship is based on physical
|
|
23
|
+
interaction of entities related to A and B. This is a direct
|
|
24
|
+
version of the increases relationship.
|
|
25
|
+
DOC
|
|
24
26
|
|
|
25
27
|
def self.short
|
|
26
28
|
SHORT
|
|
@@ -21,20 +21,20 @@ module BELParser
|
|
|
21
21
|
|
|
22
22
|
SHORT = :hasComponent
|
|
23
23
|
LONG = :hasComponent
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
|
|
25
|
+
DESCRIPTION = <<-DOC
|
|
26
|
+
HasComponent: +A hasComponent A1+ - For complexAbundance
|
|
27
|
+
term A and abundance term B, +A hasComponent B+ designates
|
|
28
|
+
B as a component of A, that complexes that are instances of
|
|
29
|
+
A have instances of B as possible components. Note that, the
|
|
30
|
+
stoichiometry of A is not described, nor is it stated that B is
|
|
31
|
+
a required component. The use of hasComponent relationships is
|
|
32
|
+
complementary to the use of functionally composed complexes and
|
|
33
|
+
is intended to enable the assignment of components to complexes
|
|
34
|
+
designated by names in external vocabularies. The assignment
|
|
35
|
+
of components can potentially enable the reconciliation of
|
|
36
|
+
equivalent complexes at knowledge assembly time.
|
|
37
|
+
DOC
|
|
38
38
|
|
|
39
39
|
def self.short
|
|
40
40
|
SHORT
|
|
@@ -19,17 +19,18 @@ module BELParser
|
|
|
19
19
|
|
|
20
20
|
SHORT = :hasComponents
|
|
21
21
|
LONG = :hasComponents
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
|
|
23
|
+
DESCRIPTION = <<-DOC
|
|
24
|
+
HasComponents: +A hasComponents (B, C, D)+ - The hasComponents
|
|
25
|
+
relationship is a special form which enables the assignment
|
|
26
|
+
of multiple complex components in a single statement where
|
|
27
|
+
the object of the statement is a set of abundance terms. A
|
|
28
|
+
statement using hasComponents is exactly equivalent to multiple
|
|
29
|
+
hasComponent statements. A term may not appear in both the
|
|
30
|
+
subject and object of the same hasComponents statement. For
|
|
31
|
+
the abundance terms A, B, C and D, +A hasComponents B, C, D+
|
|
32
|
+
indicates that A has components B, C and D.
|
|
33
|
+
DOC
|
|
33
34
|
|
|
34
35
|
def self.short
|
|
35
36
|
SHORT
|
|
@@ -17,14 +17,16 @@ module BELParser
|
|
|
17
17
|
|
|
18
18
|
SHORT = :hasMember
|
|
19
19
|
LONG = :hasMember
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
|
|
21
|
+
DESCRIPTION = <<-DOC
|
|
22
|
+
HasMember: +A hasMember A1+ - For term abundances A and B,
|
|
23
|
+
+A hasMember B+ designates B as a member class of A. A member
|
|
24
|
+
class is a distinguished sub-class. A is defined as a group
|
|
25
|
+
by all of the members assigned to it. The member classes may
|
|
26
|
+
or may not be overlapping and may or may not entirely cover
|
|
27
|
+
all instances of A. A term may not appear in both the subject
|
|
28
|
+
and object of the same hasMember statement.
|
|
29
|
+
DOC
|
|
28
30
|
|
|
29
31
|
def self.short
|
|
30
32
|
SHORT
|
|
@@ -19,18 +19,19 @@ module BELParser
|
|
|
19
19
|
|
|
20
20
|
SHORT = :hasMembers
|
|
21
21
|
LONG = :hasMembers
|
|
22
|
-
DESCRIPTION = ' +A hasMembers (B, C, D)+ - The hasMembers
|
|
23
|
-
elationship is a special form which enables the
|
|
24
|
-
ssignment of multiple member classes in a single
|
|
25
|
-
tatement where the object of the statement is a set
|
|
26
|
-
f abundance terms. A statement using hasMembers
|
|
27
|
-
s exactly equivalent to multiple hasMember
|
|
28
|
-
tatements. A term may not appear in both the
|
|
29
|
-
ubject and object of a of the same hasMembers
|
|
30
|
-
tatement. For the abundance terms A, B, C and D,
|
|
31
|
-
A hasMembers B, C, D+ indicates that A is defined
|
|
32
|
-
y its member abundance classes B, C and D.'.freeze
|
|
33
22
|
|
|
23
|
+
DESCRIPTION = <<-DOC
|
|
24
|
+
HasMembers: +A hasMembers (B, C, D)+ - The hasMembers
|
|
25
|
+
relationship is a special form which enables the assignment of
|
|
26
|
+
multiple member classes in a single statement where the object
|
|
27
|
+
of the statement is a set of abundance terms. A statement
|
|
28
|
+
using hasMembers is exactly equivalent to multiple hasMember
|
|
29
|
+
statements. A term may not appear in both the subject and
|
|
30
|
+
object of a of the same hasMembers statement. For the abundance
|
|
31
|
+
terms A, B, C and D, +A hasMembers B, C, D+ indicates that A
|
|
32
|
+
is defined by its member abundance classes B, C and D.
|
|
33
|
+
DOC
|
|
34
|
+
|
|
34
35
|
def self.short
|
|
35
36
|
SHORT
|
|
36
37
|
end
|
|
@@ -16,13 +16,15 @@ module BELParser
|
|
|
16
16
|
|
|
17
17
|
SHORT = :hasModification
|
|
18
18
|
LONG = :hasModification
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
|
|
20
|
+
DESCRIPTION = <<-DOC
|
|
21
|
+
HasModification: +p(A) hasModification p(A, pmod(P, S, 473))+
|
|
22
|
+
- This relationship links abundance terms modified by the
|
|
23
|
+
+pmod()+ function to the unmodified abundance term. This is a
|
|
24
|
+
direct relationship because it is a _self_ relationship. This
|
|
25
|
+
relationship is introduced by the BEL Compiler and may not be
|
|
26
|
+
used by statements in BEL documents.
|
|
27
|
+
DOC
|
|
26
28
|
|
|
27
29
|
def self.short
|
|
28
30
|
SHORT
|
|
@@ -17,14 +17,16 @@ module BELParser
|
|
|
17
17
|
|
|
18
18
|
SHORT = :hasProduct
|
|
19
19
|
LONG = :hasProduct
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
|
|
21
|
+
DESCRIPTION = <<-DOC
|
|
22
|
+
HasProduct: +reaction(reactants(A), products(B))
|
|
23
|
+
hasProduct B+ - This relationship links abundance
|
|
24
|
+
terms from the +products(<list>)+ in a reaction to the
|
|
25
|
+
reaction. This is a direct relationship because it is a _self_
|
|
26
|
+
relationship. Products are produced directly by a reaction. This
|
|
27
|
+
relationship is introduced by the BEL Compiler and may not be
|
|
28
|
+
used by statements in BEL documents.
|
|
29
|
+
DOC
|
|
28
30
|
|
|
29
31
|
def self.short
|
|
30
32
|
SHORT
|