bel_parser 1.0.8 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +12 -2
- 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 +25 -3
@@ -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,15 @@ module BELParser
|
|
17
17
|
|
18
18
|
SHORT = :hasMember
|
19
19
|
LONG = :hasMember
|
20
|
-
DESCRIPTION =
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
20
|
+
DESCRIPTION = <<-DOC
|
21
|
+
HasMember: +A hasMember A1+ - For term abundances A and B,
|
22
|
+
+A hasMember B+ designates B as a member class of A. A member
|
23
|
+
class is a distinguished sub-class. A is defined as a group
|
24
|
+
by all of the members assigned to it. The member classes may
|
25
|
+
or may not be overlapping and may or may not entirely cover
|
26
|
+
all instances of A. A term may not appear in both the subject
|
27
|
+
and object of the same hasMember statement.
|
28
|
+
DOC
|
28
29
|
|
29
30
|
def self.short
|
30
31
|
SHORT
|
@@ -19,17 +19,18 @@ module BELParser
|
|
19
19
|
|
20
20
|
SHORT = :hasMembers
|
21
21
|
LONG = :hasMembers
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
33
34
|
|
34
35
|
def self.short
|
35
36
|
SHORT
|
@@ -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
|
@@ -16,13 +16,15 @@ module BELParser
|
|
16
16
|
|
17
17
|
SHORT = :hasVariant
|
18
18
|
LONG = :hasVariant
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
|
20
|
+
DESCRIPTION = <<-DOC
|
21
|
+
HasVariant: +p(A) hasVariant p(A, sub(G, 12, V))+ -
|
22
|
+
This relationship links abundance terms modified by the
|
23
|
+
+substitution()+, +fusion()+, or +truncation()+ functions to
|
24
|
+
the unmodified abundance term. This relationship is introduced
|
25
|
+
by the BEL Compiler and does not need to be used by statements
|
26
|
+
in BEL documents.
|
27
|
+
DOC
|
26
28
|
|
27
29
|
def self.short
|
28
30
|
SHORT
|
@@ -18,16 +18,17 @@ module BELParser
|
|
18
18
|
|
19
19
|
SHORT = :includes
|
20
20
|
LONG = :includes
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
21
|
+
|
22
|
+
DESCRIPTION = <<-DOC
|
23
|
+
Includes: +compositeAbundance(A,B) includes A+ - This
|
24
|
+
relationship links each individual abundance term in a
|
25
|
+
+compositeAbundance(<list>)+ to the compositeAbundance. For
|
26
|
+
example, +compositeAbundance(A, B) includes A+ and
|
27
|
+
+compositeAbundance(A, B) includes B+. This relationship is
|
28
|
+
direct because it is a _self_ relationship. This relationship
|
29
|
+
is introduced by the BEL Compiler and may not be used by
|
30
|
+
statements in BEL documents.
|
31
|
+
DOC
|
31
32
|
|
32
33
|
def self.short
|
33
34
|
SHORT
|
@@ -20,18 +20,19 @@ module BELParser
|
|
20
20
|
|
21
21
|
SHORT = :'->'
|
22
22
|
LONG = :increases
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
23
|
+
|
24
|
+
DESCRIPTION = <<-DOC
|
25
|
+
Increases: +A -> B+ - For terms A and B, +A increases B or
|
26
|
+
A -> B+ indicates that increases in A have been observed to
|
27
|
+
cause increases in B. +A increases B+ also represents cases
|
28
|
+
where decreases in A have been observed to cause decreases 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
|
@@ -17,14 +17,16 @@ module BELParser
|
|
17
17
|
|
18
18
|
SHORT = :isA
|
19
19
|
LONG = :isA
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
20
|
+
|
21
|
+
DESCRIPTION = <<-DOC
|
22
|
+
IsA: +A isA B+ - For terms A and B, +A isA B+ indicates
|
23
|
+
that A is a subset of B. All terms in BEL represent classes,
|
24
|
+
but given that classes implicitly have instances, one can
|
25
|
+
also interpret +A isA B+ to mean that any instance of A must
|
26
|
+
also be an instance of B. This relationship can be used to
|
27
|
+
represent GO and MeSH hierarchies: +pathology(MESH:Psoriasis)
|
28
|
+
isA pathology(MESH:"Skin Diseases")+
|
29
|
+
DOC
|
28
30
|
|
29
31
|
def self.short
|
30
32
|
SHORT
|
@@ -16,13 +16,15 @@ module BELParser
|
|
16
16
|
|
17
17
|
SHORT = :negativeCorrelation
|
18
18
|
LONG = :negativeCorrelation
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
|
20
|
+
DESCRIPTION = <<-DOC
|
21
|
+
NegativeCorrelation: +A negativeCorrelation B+ - For terms
|
22
|
+
A and B, +A negativeCorrelation B+ indicates that changes in A
|
23
|
+
and B have been observed to be negatively correlated. The order
|
24
|
+
of the subject and object does not affect the interpretation
|
25
|
+
of the statement, thus B negativeCorrelation A is equivalent
|
26
|
+
to A negativeCorrelation B.
|
27
|
+
DOC
|
26
28
|
|
27
29
|
def self.short
|
28
30
|
SHORT
|
@@ -17,14 +17,16 @@ module BELParser
|
|
17
17
|
|
18
18
|
SHORT = :orthologous
|
19
19
|
LONG = :orthologous
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
20
|
+
|
21
|
+
DESCRIPTION = <<-DOC
|
22
|
+
Orthologous: +A orthologous B+ - For geneAbundance terms A
|
23
|
+
and B, +A orthologousTo B+ indicates that A and B represent
|
24
|
+
abundances of genes in different species which are sequence
|
25
|
+
similar and which are therefore presumed to share a common
|
26
|
+
ancestral gene. For example, +g(HGNC:AKT1) orthologousTo
|
27
|
+
g(MGI:AKT1)+ indicates that the mouse and human AKT1 genes
|
28
|
+
are orthologous.
|
29
|
+
DOC
|
28
30
|
|
29
31
|
def self.short
|
30
32
|
SHORT
|
@@ -14,11 +14,13 @@ module BELParser
|
|
14
14
|
|
15
15
|
SHORT = :positiveCorrelation
|
16
16
|
LONG = :positiveCorrelation
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
|
18
|
+
DESCRIPTION = <<-DOC
|
19
|
+
PositiveCorrelation: +A positiveCorrelation B+ - For terms
|
20
|
+
A and B, +A positiveCorrelation B+ indicates that changes in
|
21
|
+
A and B have been observed to be positively correlated, thus B
|
22
|
+
positiveCorrelation A is equivalent to A positiveCorrelation B.
|
23
|
+
DOC
|
22
24
|
|
23
25
|
def self.short
|
24
26
|
SHORT
|
@@ -15,12 +15,14 @@ module BELParser
|
|
15
15
|
|
16
16
|
SHORT = :prognosticBiomarkerFor
|
17
17
|
LONG = :prognosticBiomarkerFor
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
|
19
|
+
DESCRIPTION = <<-DOC
|
20
|
+
PrognosticBiomarkerFor: +A prognosticBiomarkerFor P+ -
|
21
|
+
For term A and process term P, +A prognosticBiomarkerFor P+
|
22
|
+
indicates that changes in or detection of A is used in some
|
23
|
+
way to be a prognostic biomarker for the subsequent development
|
24
|
+
of pathology or biological process P.
|
25
|
+
DOC
|
24
26
|
|
25
27
|
def self.short
|
26
28
|
SHORT
|
@@ -17,15 +17,16 @@ module BELParser
|
|
17
17
|
|
18
18
|
SHORT = :rateLimitingStepOf
|
19
19
|
LONG = :rateLimitingStepOf
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
|
21
|
+
DESCRIPTION = <<-DOC
|
22
|
+
RateLimitingStepOf: +A rateLimitingStepOf B+ - For process,
|
23
|
+
activity, or transformation term A and process term B, +A
|
24
|
+
rateLimitingStepOf B+ indicates +A subProcessOf B+ and +A ->
|
25
|
+
B+. For example, the catalytic activity of HMG CoA reductase
|
26
|
+
is a rate-limiting step for cholesterol biosynthesis: <pre>
|
27
|
+
<code> cat(p(HGNC:HMGCR)) rateLimitingStepOf\ bp(GO:"cholesterol
|
28
|
+
biosynthetic process") </code> </pre>
|
29
|
+
DOC
|
29
30
|
|
30
31
|
def self.short
|
31
32
|
SHORT
|
@@ -17,14 +17,16 @@ module BELParser
|
|
17
17
|
|
18
18
|
SHORT = :reactantIn
|
19
19
|
LONG = :reactantIn
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
20
|
+
|
21
|
+
DESCRIPTION = <<-DOC
|
22
|
+
ReactantIn: +A reactantIn reaction(reactants(A),
|
23
|
+
products(B))+ - This relationship links abundance
|
24
|
+
terms from the +reactants(<list>)+ in a reaction to the
|
25
|
+
reaction. This is a direct relationship because it is a
|
26
|
+
_self_ relationship. Reactants are consumed directly by a
|
27
|
+
reaction. This relationship is introduced by the BEL Compiler
|
28
|
+
and may not be used by statements in BEL documents.
|
29
|
+
DOC
|
28
30
|
|
29
31
|
def self.short
|
30
32
|
SHORT
|
@@ -16,14 +16,15 @@ module BELParser
|
|
16
16
|
|
17
17
|
SHORT = :reg
|
18
18
|
LONG = :regulates
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
|
20
|
+
DESCRIPTION = <<-DOC
|
21
|
+
Regulates: +A regulates B+ - For terms A and B, A regulates
|
22
|
+
B or A reg B indicate that A is reported to have an effect on
|
23
|
+
B, but information is missing about whether A increases B or
|
24
|
+
A decreases B. This relationship provides more information
|
25
|
+
than association, because the upstream entity (source term)
|
26
|
+
and downstream entity (target term) can be assigned.
|
27
|
+
DOC
|
27
28
|
|
28
29
|
def self.short
|
29
30
|
SHORT
|
@@ -20,18 +20,19 @@ module BELParser
|
|
20
20
|
|
21
21
|
SHORT = :subProcessOf
|
22
22
|
LONG = :subProcessOf
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
23
|
+
|
24
|
+
DESCRIPTION = <<-DOC
|
25
|
+
SubProcessOf: +A subProcessOf B+ - For process, activity, or
|
26
|
+
transformation term A and process term B, +A subProcessOf B+
|
27
|
+
indicates that instances of process B, by default, include
|
28
|
+
one or more instances of A in their composition. For
|
29
|
+
example, the reduction of HMG-CoA to mevalonate is
|
30
|
+
a subprocess of cholesterol biosynthesis: <pre> <code>
|
31
|
+
rxn(reactants(a(CHEBI:"(S)-3-hydroxy-3-methylglutaryl-CoA"),\
|
32
|
+
a(CHEBI:NADPH), a(CHEBI:hydron)), products(a(CHEBI:Mevalonate),\
|
33
|
+
a(CHEBI:"CoA-SH"), a(CHEBI:"NADP+"))) subProcessOf
|
34
|
+
bp(GO:"cholesterol\ biosynthetic process") </code> </pre>
|
35
|
+
DOC
|
35
36
|
|
36
37
|
def self.short
|
37
38
|
SHORT
|
@@ -15,13 +15,14 @@ module BELParser
|
|
15
15
|
|
16
16
|
SHORT = :':>'
|
17
17
|
LONG = :transcribedTo
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
|
19
|
+
DESCRIPTION = <<-DOC
|
20
|
+
TranscribedTo: +G :> R+ - For rnaAbundance term R and
|
21
|
+
geneAbundance term G, +G transcribedTo R+ or +G :> R+ indicates
|
22
|
+
that members of R are produced by the transcription of members
|
23
|
+
of G. For example: +g(HGNC:AKT1) :> r(HGNC:AKT1)+ indicates
|
24
|
+
that the human AKT1 RNA is transcribed from the human AKT1 gene.
|
25
|
+
DOC
|
25
26
|
|
26
27
|
def self.short
|
27
28
|
SHORT
|
@@ -16,13 +16,15 @@ module BELParser
|
|
16
16
|
|
17
17
|
SHORT = :>>
|
18
18
|
LONG = :translatedTo
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
|
20
|
+
DESCRIPTION = <<-DOC
|
21
|
+
TranslatedTo: +R >> P+ - For rnaAbundance term R and
|
22
|
+
proteinAbundance term P, +R translatedTo P+ or +R >> P+
|
23
|
+
indicates that members of P are produced by the translation
|
24
|
+
of members of R. For example: +r(HGNC:AKT1) >> p(HGNC:AKT1)+
|
25
|
+
indicates that AKT1 protein is produced by translation of
|
26
|
+
AKT1 RNA.
|
27
|
+
DOC
|
26
28
|
|
27
29
|
def self.short
|
28
30
|
SHORT
|
@@ -17,15 +17,16 @@ module BELParser
|
|
17
17
|
|
18
18
|
SHORT = :translocates
|
19
19
|
LONG = :translocates
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
|
21
|
+
DESCRIPTION = <<-DOC
|
22
|
+
Translocates: +translocation(A, ns1:v1, ns2:v2) translocates
|
23
|
+
A+ - This relationship links the abundance term in a
|
24
|
+
+translocation()+ to the translocation. This relationship is
|
25
|
+
direct because it is a _self_ relationship. The translocated
|
26
|
+
abundance is directly acted on by the translocation
|
27
|
+
process. This relationship is introduced by the BEL Compiler
|
28
|
+
and may not be used by statements in BEL documents.
|
29
|
+
DOC
|
29
30
|
|
30
31
|
def self.short
|
31
32
|
SHORT
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module BELParser
|
2
|
+
# Adds a levenshtein implementation based on which ruby engine is used.
|
3
|
+
module Levenshtein
|
4
|
+
|
5
|
+
unless self.methods.include?(:distance)
|
6
|
+
|
7
|
+
if RUBY_ENGINE =~ /^jruby/i
|
8
|
+
require 'levenshtein'
|
9
|
+
define_singleton_method(:distance) do |string1, string2|
|
10
|
+
::Levenshtein.distance(string1, string2)
|
11
|
+
end
|
12
|
+
else
|
13
|
+
require "damerau-levenshtein"
|
14
|
+
define_singleton_method(:distance) do |string1, string2|
|
15
|
+
::DamerauLevenshtein.distance(string1, string2)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|