bel_parser 1.0.0.alpha.7 → 1.0.0.alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +1 -1
- data/VERSION +1 -1
- data/bin/bel2_validator +7 -4
- data/lib/bel_parser/ast_filter.rb +2 -2
- data/lib/bel_parser/ast_generator.rb +11 -18
- data/lib/bel_parser/language/expression_validator.rb +8 -0
- data/lib/bel_parser/language/quoting.rb +19 -22
- data/lib/bel_parser/language/semantics/deeply_nested_statement.rb +65 -0
- data/lib/bel_parser/language/semantics/function_deprecation.rb +36 -0
- data/lib/bel_parser/language/semantics/list_function_subject.rb +45 -0
- data/lib/bel_parser/language/semantics/relationship_deprecation.rb +36 -0
- data/lib/bel_parser/language/semantics/signature_mapping.rb +30 -16
- data/lib/bel_parser/language/semantics.rb +7 -2
- data/lib/bel_parser/language/semantics_ast.rb +22 -12
- data/lib/bel_parser/language/semantics_function.rb +4 -1
- data/lib/bel_parser/language/semantics_result.rb +1 -0
- data/lib/bel_parser/language/semantics_warning.rb +2 -0
- data/lib/bel_parser/language/signature.rb +3 -3
- data/lib/bel_parser/language/syntax/invalid_function.rb +2 -2
- data/lib/bel_parser/language/syntax/invalid_relationship.rb +2 -2
- data/lib/bel_parser/language/syntax/undefined_namespace.rb +0 -1
- data/lib/bel_parser/language/syntax.rb +7 -2
- data/lib/bel_parser/language/syntax_error.rb +2 -0
- data/lib/bel_parser/language/syntax_function.rb +4 -1
- data/lib/bel_parser/language/syntax_result.rb +1 -0
- data/lib/bel_parser/language/syntax_warning.rb +2 -0
- data/lib/bel_parser/language/version1_0/functions/abundance.rb +14 -15
- data/lib/bel_parser/language/version1_0/functions/biological_process.rb +14 -15
- data/lib/bel_parser/language/version1_0/functions/catalytic_activity.rb +25 -21
- data/lib/bel_parser/language/version1_0/functions/cell_secretion.rb +15 -12
- data/lib/bel_parser/language/version1_0/functions/cell_surface_expression.rb +15 -12
- data/lib/bel_parser/language/version1_0/functions/chaperone_activity.rb +25 -21
- data/lib/bel_parser/language/version1_0/functions/complex_abundance.rb +26 -25
- data/lib/bel_parser/language/version1_0/functions/composite_abundance.rb +13 -12
- data/lib/bel_parser/language/version1_0/functions/degradation.rb +15 -12
- data/lib/bel_parser/language/version1_0/functions/fusion.rb +135 -129
- data/lib/bel_parser/language/version1_0/functions/gene_abundance.rb +34 -34
- data/lib/bel_parser/language/version1_0/functions/gtp_bound_activity.rb +24 -21
- data/lib/bel_parser/language/version1_0/functions/kinase_activity.rb +25 -21
- data/lib/bel_parser/language/version1_0/functions/list.rb +24 -24
- data/lib/bel_parser/language/version1_0/functions/micro_rna_abundance.rb +18 -17
- data/lib/bel_parser/language/version1_0/functions/molecular_activity.rb +14 -12
- data/lib/bel_parser/language/version1_0/functions/pathology.rb +14 -15
- data/lib/bel_parser/language/version1_0/functions/peptidase_activity.rb +23 -21
- data/lib/bel_parser/language/version1_0/functions/phosphatase_activity.rb +23 -21
- data/lib/bel_parser/language/version1_0/functions/products.rb +9 -10
- data/lib/bel_parser/language/version1_0/functions/protein_abundance.rb +94 -91
- data/lib/bel_parser/language/version1_0/functions/protein_modification.rb +60 -57
- data/lib/bel_parser/language/version1_0/functions/reactants.rb +9 -10
- data/lib/bel_parser/language/version1_0/functions/reaction.rb +18 -17
- data/lib/bel_parser/language/version1_0/functions/ribosylation_activity.rb +25 -21
- data/lib/bel_parser/language/version1_0/functions/rna_abundance.rb +34 -34
- data/lib/bel_parser/language/version1_0/functions/substitution.rb +29 -28
- data/lib/bel_parser/language/version1_0/functions/transcriptional_activity.rb +25 -21
- data/lib/bel_parser/language/version1_0/functions/translocation.rb +33 -32
- data/lib/bel_parser/language/version1_0/functions/transport_activity.rb +26 -21
- data/lib/bel_parser/language/version1_0/functions/truncation.rb +15 -14
- data/lib/bel_parser/language/version1_0/relationships/acts_in.rb +16 -2
- data/lib/bel_parser/language/version1_0/relationships/analogous.rb +8 -2
- data/lib/bel_parser/language/version1_0/relationships/association.rb +13 -2
- data/lib/bel_parser/language/version1_0/relationships/biomarker_for.rb +9 -2
- data/lib/bel_parser/language/version1_0/relationships/causes_no_change.rb +13 -2
- data/lib/bel_parser/language/version1_0/relationships/decreases.rb +22 -2
- data/lib/bel_parser/language/version1_0/relationships/directly_decreases.rb +11 -2
- data/lib/bel_parser/language/version1_0/relationships/directly_increases.rb +11 -2
- data/lib/bel_parser/language/version1_0/relationships/has_component.rb +25 -2
- data/lib/bel_parser/language/version1_0/relationships/has_components.rb +20 -2
- data/lib/bel_parser/language/version1_0/relationships/has_member.rb +15 -2
- data/lib/bel_parser/language/version1_0/relationships/has_members.rb +20 -2
- data/lib/bel_parser/language/version1_0/relationships/has_modification.rb +13 -2
- data/lib/bel_parser/language/version1_0/relationships/has_product.rb +15 -2
- data/lib/bel_parser/language/version1_0/relationships/has_variant.rb +13 -2
- data/lib/bel_parser/language/version1_0/relationships/includes.rb +18 -2
- data/lib/bel_parser/language/version1_0/relationships/increases.rb +22 -2
- data/lib/bel_parser/language/version1_0/relationships/is_a.rb +15 -2
- data/lib/bel_parser/language/version1_0/relationships/negative_correlation.rb +13 -2
- data/lib/bel_parser/language/version1_0/relationships/orthologous.rb +15 -2
- data/lib/bel_parser/language/version1_0/relationships/positive_correlation.rb +9 -2
- data/lib/bel_parser/language/version1_0/relationships/prognostic_biomarker_for.rb +11 -2
- data/lib/bel_parser/language/version1_0/relationships/rate_limiting_step_of.rb +16 -2
- data/lib/bel_parser/language/version1_0/relationships/reactant_in.rb +15 -2
- data/lib/bel_parser/language/version1_0/relationships/sub_process_of.rb +22 -2
- data/lib/bel_parser/language/version1_0/relationships/transcribed_to.rb +12 -2
- data/lib/bel_parser/language/version1_0/relationships/translated_to.rb +13 -2
- data/lib/bel_parser/language/version1_0/relationships/translocates.rb +16 -2
- data/lib/bel_parser/language/version1_0/syntax/function.rb +0 -1
- data/lib/bel_parser/language/version1_0.rb +13 -2
- data/lib/bel_parser/language/version2_0/functions/abundance.rb +54 -53
- data/lib/bel_parser/language/version2_0/functions/activity.rb +8 -5
- data/lib/bel_parser/language/version2_0/functions/biological_process.rb +16 -16
- data/lib/bel_parser/language/version2_0/functions/cell_secretion.rb +15 -12
- data/lib/bel_parser/language/version2_0/functions/cell_surface_expression.rb +15 -12
- data/lib/bel_parser/language/version2_0/functions/complex_abundance.rb +61 -58
- data/lib/bel_parser/language/version2_0/functions/composite_abundance.rb +13 -12
- data/lib/bel_parser/language/version2_0/functions/degradation.rb +15 -12
- data/lib/bel_parser/language/version2_0/functions/fragment.rb +8 -6
- data/lib/bel_parser/language/version2_0/functions/from_location.rb +18 -17
- data/lib/bel_parser/language/version2_0/functions/fusion.rb +120 -117
- data/lib/bel_parser/language/version2_0/functions/gene_abundance.rb +64 -62
- data/lib/bel_parser/language/version2_0/functions/list.rb +24 -24
- data/lib/bel_parser/language/version2_0/functions/location.rb +14 -15
- data/lib/bel_parser/language/version2_0/functions/micro_rna_abundance.rb +58 -55
- data/lib/bel_parser/language/version2_0/functions/molecular_activity.rb +16 -14
- data/lib/bel_parser/language/version2_0/functions/pathology.rb +14 -15
- data/lib/bel_parser/language/version2_0/functions/products.rb +9 -10
- data/lib/bel_parser/language/version2_0/functions/protein_abundance.rb +96 -92
- data/lib/bel_parser/language/version2_0/functions/protein_modification.rb +57 -54
- data/lib/bel_parser/language/version2_0/functions/reactants.rb +9 -10
- data/lib/bel_parser/language/version2_0/functions/reaction.rb +18 -17
- data/lib/bel_parser/language/version2_0/functions/rna_abundance.rb +64 -62
- data/lib/bel_parser/language/version2_0/functions/to_location.rb +16 -16
- data/lib/bel_parser/language/version2_0/functions/translocation.rb +23 -22
- data/lib/bel_parser/language/version2_0/functions/variant.rb +13 -13
- data/lib/bel_parser/language/version2_0/relationships/acts_in.rb +16 -2
- data/lib/bel_parser/language/version2_0/relationships/analogous.rb +8 -2
- data/lib/bel_parser/language/version2_0/relationships/association.rb +13 -2
- data/lib/bel_parser/language/version2_0/relationships/biomarker_for.rb +9 -2
- data/lib/bel_parser/language/version2_0/relationships/causes_no_change.rb +13 -2
- data/lib/bel_parser/language/version2_0/relationships/decreases.rb +22 -2
- data/lib/bel_parser/language/version2_0/relationships/directly_decreases.rb +11 -2
- data/lib/bel_parser/language/version2_0/relationships/directly_increases.rb +11 -2
- data/lib/bel_parser/language/version2_0/relationships/has_component.rb +25 -2
- data/lib/bel_parser/language/version2_0/relationships/has_components.rb +20 -2
- data/lib/bel_parser/language/version2_0/relationships/has_member.rb +15 -2
- data/lib/bel_parser/language/version2_0/relationships/has_members.rb +20 -2
- data/lib/bel_parser/language/version2_0/relationships/has_modification.rb +13 -2
- data/lib/bel_parser/language/version2_0/relationships/has_product.rb +15 -2
- data/lib/bel_parser/language/version2_0/relationships/has_variant.rb +13 -2
- data/lib/bel_parser/language/version2_0/relationships/includes.rb +18 -2
- data/lib/bel_parser/language/version2_0/relationships/increases.rb +22 -2
- data/lib/bel_parser/language/version2_0/relationships/is_a.rb +15 -2
- data/lib/bel_parser/language/version2_0/relationships/negative_correlation.rb +13 -2
- data/lib/bel_parser/language/version2_0/relationships/orthologous.rb +15 -2
- data/lib/bel_parser/language/version2_0/relationships/positive_correlation.rb +9 -2
- data/lib/bel_parser/language/version2_0/relationships/prognostic_biomarker_for.rb +11 -2
- data/lib/bel_parser/language/version2_0/relationships/rate_limiting_step_of.rb +16 -2
- data/lib/bel_parser/language/version2_0/relationships/reactant_in.rb +15 -2
- data/lib/bel_parser/language/version2_0/relationships/regulates.rb +14 -2
- data/lib/bel_parser/language/version2_0/relationships/sub_process_of.rb +22 -2
- data/lib/bel_parser/language/version2_0/relationships/transcribed_to.rb +12 -2
- data/lib/bel_parser/language/version2_0/relationships/translated_to.rb +13 -2
- data/lib/bel_parser/language/version2_0/relationships/translocates.rb +16 -2
- data/lib/bel_parser/language.rb +18 -8
- data/lib/bel_parser/parser.rb +1 -0
- data/lib/bel_parser/parsers/ast/node.rb +112 -74
- data/lib/bel_parser/parsers/bel_script/set.rl +1 -1
- data/lib/bel_parser/parsers/bel_script/set_document.rb +7087 -0
- data/lib/bel_parser/parsers/bel_script/set_document.rl +97 -0
- data/lib/bel_parser/parsers/bel_script.rb +1 -0
- data/lib/bel_parser/parsers/common/common.rl +1 -1
- data/lib/bel_parser/script/parser.rb +1 -0
- metadata +8 -2
@@ -5,13 +5,20 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# PositiveCorrelation: +A positiveCorrelation B+ - For terms
|
8
|
+
# PositiveCorrelation: +A positiveCorrelation B+ - For terms
|
9
|
+
# A and B, +A positiveCorrelation B+ indicates that changes in
|
10
|
+
# A and B have been observed to be positively correlated, thus B
|
11
|
+
# positiveCorrelation A is equivalent to A positiveCorrelation B.
|
9
12
|
class PositiveCorrelation
|
10
13
|
extend Relationship
|
11
14
|
|
12
15
|
SHORT = :positiveCorrelation
|
13
16
|
LONG = :positiveCorrelation
|
14
|
-
DESCRIPTION = ' +A positiveCorrelation B+ - For terms A and B,
|
17
|
+
DESCRIPTION = ' +A positiveCorrelation B+ - For terms A and B,
|
18
|
+
A positiveCorrelation B+ indicates that changes
|
19
|
+
n A and B have been observed to be positively
|
20
|
+
orrelated, thus B positiveCorrelation A is
|
21
|
+
quivalent to A positiveCorrelation B.'.freeze
|
15
22
|
|
16
23
|
def self.short
|
17
24
|
SHORT
|
@@ -5,13 +5,22 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# PrognosticBiomarkerFor: +A prognosticBiomarkerFor P+ -
|
8
|
+
# PrognosticBiomarkerFor: +A prognosticBiomarkerFor P+ -
|
9
|
+
# For term A and process term P, +A prognosticBiomarkerFor P+
|
10
|
+
# indicates that changes in or detection of A is used in some
|
11
|
+
# way to be a prognostic biomarker for the subsequent development
|
12
|
+
# of pathology or biological process P.
|
9
13
|
class PrognosticBiomarkerFor
|
10
14
|
extend Relationship
|
11
15
|
|
12
16
|
SHORT = :prognosticBiomarkerFor
|
13
17
|
LONG = :prognosticBiomarkerFor
|
14
|
-
DESCRIPTION = ' +A prognosticBiomarkerFor P+ - For term A
|
18
|
+
DESCRIPTION = ' +A prognosticBiomarkerFor P+ - For term A
|
19
|
+
nd process term P, +A prognosticBiomarkerFor P+
|
20
|
+
ndicates that changes in or detection of A is used
|
21
|
+
n some way to be a prognostic biomarker for the
|
22
|
+
ubsequent development of pathology or biological
|
23
|
+
rocess P.'.freeze
|
15
24
|
|
16
25
|
def self.short
|
17
26
|
SHORT
|
@@ -5,13 +5,27 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# RateLimitingStepOf: +A rateLimitingStepOf B+ - For process,
|
8
|
+
# RateLimitingStepOf: +A rateLimitingStepOf B+ - For process,
|
9
|
+
# activity, or transformation term A and process term B, +A
|
10
|
+
# rateLimitingStepOf B+ indicates +A subProcessOf B+ and +A ->
|
11
|
+
# B+. For example, the catalytic activity of HMG CoA reductase
|
12
|
+
# is a rate-limiting step for cholesterol biosynthesis: <pre>
|
13
|
+
# <code> cat(p(HGNC:HMGCR)) rateLimitingStepOf\ bp(GO:"cholesterol
|
14
|
+
# biosynthetic process") </code> </pre>
|
9
15
|
class RateLimitingStepOf
|
10
16
|
extend Relationship
|
11
17
|
|
12
18
|
SHORT = :rateLimitingStepOf
|
13
19
|
LONG = :rateLimitingStepOf
|
14
|
-
DESCRIPTION = ' +A rateLimitingStepOf B+ - For process,
|
20
|
+
DESCRIPTION = ' +A rateLimitingStepOf B+ - For process,
|
21
|
+
ctivity, or transformation term A and process
|
22
|
+
erm B, +A rateLimitingStepOf B+ indicates
|
23
|
+
A subProcessOf B+ and +A -> B+. For example,
|
24
|
+
he catalytic activity of HMG CoA reductase is a
|
25
|
+
ate-limiting step for cholesterol biosynthesis:
|
26
|
+
pre> <code> cat(p(HGNC:HMGCR)) rateLimitingStepOf\
|
27
|
+
p(GO:"cholesterol biosynthetic process") </code>
|
28
|
+
/pre>'.freeze
|
15
29
|
|
16
30
|
def self.short
|
17
31
|
SHORT
|
@@ -5,13 +5,26 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# ReactantIn: +A reactantIn reaction(reactants(A),
|
8
|
+
# ReactantIn: +A reactantIn reaction(reactants(A),
|
9
|
+
# products(B))+ - This relationship links abundance
|
10
|
+
# terms from the +reactants(<list>)+ in a reaction to the
|
11
|
+
# reaction. This is a direct relationship because it is a
|
12
|
+
# _self_ relationship. Reactants are consumed directly by a
|
13
|
+
# reaction. This relationship is introduced by the BEL Compiler
|
14
|
+
# and may not be used by statements in BEL documents.
|
9
15
|
class ReactantIn
|
10
16
|
extend Relationship
|
11
17
|
|
12
18
|
SHORT = :reactantIn
|
13
19
|
LONG = :reactantIn
|
14
|
-
DESCRIPTION = ' +A reactantIn reaction(reactants(A),
|
20
|
+
DESCRIPTION = ' +A reactantIn reaction(reactants(A),
|
21
|
+
roducts(B))+ - This relationship links abundance
|
22
|
+
erms from the +reactants(<list>)+ in a reaction
|
23
|
+
o the reaction. This is a direct relationship
|
24
|
+
ecause it is a _self_ relationship. Reactants are
|
25
|
+
onsumed directly by a reaction. This relationship
|
26
|
+
s introduced by the BEL Compiler and may not be
|
27
|
+
sed by statements in BEL documents.'.freeze
|
15
28
|
|
16
29
|
def self.short
|
17
30
|
SHORT
|
@@ -5,13 +5,25 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# Regulates: +A regulates B+ - For terms A and B, A regulates
|
8
|
+
# Regulates: +A regulates B+ - For terms A and B, A regulates
|
9
|
+
# B or A reg B indicate that A is reported to have an effect on
|
10
|
+
# B, but information is missing about whether A increases B or
|
11
|
+
# A decreases B. This relationship provides more information
|
12
|
+
# than association, because the upstream entity (source term)
|
13
|
+
# and downstream entity (target term) can be assigned.
|
9
14
|
class Regulates
|
10
15
|
extend Relationship
|
11
16
|
|
12
17
|
SHORT = :reg
|
13
18
|
LONG = :regulates
|
14
|
-
DESCRIPTION = '+A regulates B+ - For terms A and B, A regulates
|
19
|
+
DESCRIPTION = '+A regulates B+ - For terms A and B, A regulates
|
20
|
+
or A reg B indicate that A is reported to
|
21
|
+
ave an effect on B, but information is missing
|
22
|
+
bout whether A increases B or A decreases
|
23
|
+
. This relationship provides more information
|
24
|
+
han association, because the upstream entity
|
25
|
+
source term) and downstream entity (target term)
|
26
|
+
an be assigned.'.freeze
|
15
27
|
|
16
28
|
def self.short
|
17
29
|
SHORT
|
@@ -5,13 +5,33 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# SubProcessOf: +A subProcessOf B+ - For process, activity, or
|
8
|
+
# SubProcessOf: +A subProcessOf B+ - For process, activity, or
|
9
|
+
# transformation term A and process term B, +A subProcessOf B+
|
10
|
+
# indicates that instances of process B, by default, include
|
11
|
+
# one or more instances of A in their composition. For
|
12
|
+
# example, the reduction of HMG-CoA to mevalonate is
|
13
|
+
# a subprocess of cholesterol biosynthesis: <pre> <code>
|
14
|
+
# rxn(reactants(a(CHEBI:"(S)-3-hydroxy-3-methylglutaryl-CoA"),\
|
15
|
+
# a(CHEBI:NADPH), a(CHEBI:hydron)), products(a(CHEBI:Mevalonate),\
|
16
|
+
# a(CHEBI:"CoA-SH"), a(CHEBI:"NADP+"))) subProcessOf
|
17
|
+
# bp(GO:"cholesterol\ biosynthetic process") </code> </pre>
|
9
18
|
class SubProcessOf
|
10
19
|
extend Relationship
|
11
20
|
|
12
21
|
SHORT = :subProcessOf
|
13
22
|
LONG = :subProcessOf
|
14
|
-
DESCRIPTION = ' +A subProcessOf B+ - For process, activity,
|
23
|
+
DESCRIPTION = ' +A subProcessOf B+ - For process, activity,
|
24
|
+
r transformation term A and process term B,
|
25
|
+
A subProcessOf B+ indicates that instances
|
26
|
+
f process B, by default, include one or more
|
27
|
+
nstances of A in their composition. For example,
|
28
|
+
he reduction of HMG-CoA to mevalonate is a
|
29
|
+
ubprocess of cholesterol biosynthesis: <pre> <code>
|
30
|
+
xn(reactants(a(CHEBI:"(S)-3-hydroxy-3-methylglutaryl-CoA"),\
|
31
|
+
(CHEBI:NADPH), a(CHEBI:hydron)),
|
32
|
+
roducts(a(CHEBI:Mevalonate),\ a(CHEBI:"CoA-SH"),
|
33
|
+
(CHEBI:"NADP+"))) subProcessOf bp(GO:"cholesterol\
|
34
|
+
iosynthetic process") </code> </pre>'.freeze
|
15
35
|
|
16
36
|
def self.short
|
17
37
|
SHORT
|
@@ -5,13 +5,23 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# TranscribedTo: +G :> R+ - For rnaAbundance term R and
|
8
|
+
# TranscribedTo: +G :> R+ - For rnaAbundance term R and
|
9
|
+
# geneAbundance term G, +G transcribedTo R+ or +G :> R+ indicates
|
10
|
+
# that members of R are produced by the transcription of members
|
11
|
+
# of G. For example: +g(HGNC:AKT1) :> r(HGNC:AKT1)+ indicates
|
12
|
+
# that the human AKT1 RNA is transcribed from the human AKT1 gene.
|
9
13
|
class TranscribedTo
|
10
14
|
extend Relationship
|
11
15
|
|
12
16
|
SHORT = :':>'
|
13
17
|
LONG = :transcribedTo
|
14
|
-
DESCRIPTION = ' +G :> R+ - For rnaAbundance term R and
|
18
|
+
DESCRIPTION = ' +G :> R+ - For rnaAbundance term R and
|
19
|
+
eneAbundance term G, +G transcribedTo R+ or +G :>
|
20
|
+
+ indicates that members of R are produced by
|
21
|
+
he transcription of members of G. For example:
|
22
|
+
g(HGNC:AKT1) :> r(HGNC:AKT1)+ indicates that
|
23
|
+
he human AKT1 RNA is transcribed from the human
|
24
|
+
KT1 gene.'.freeze
|
15
25
|
|
16
26
|
def self.short
|
17
27
|
SHORT
|
@@ -5,13 +5,24 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# TranslatedTo: +R >> P+ - For rnaAbundance term R and
|
8
|
+
# TranslatedTo: +R >> P+ - For rnaAbundance term R and
|
9
|
+
# proteinAbundance term P, +R translatedTo P+ or +R >> P+
|
10
|
+
# indicates that members of P are produced by the translation
|
11
|
+
# of members of R. For example: +r(HGNC:AKT1) >> p(HGNC:AKT1)+
|
12
|
+
# indicates that AKT1 protein is produced by translation of
|
13
|
+
# AKT1 RNA.
|
9
14
|
class TranslatedTo
|
10
15
|
extend Relationship
|
11
16
|
|
12
17
|
SHORT = :>>
|
13
18
|
LONG = :translatedTo
|
14
|
-
DESCRIPTION = ' +R >> P+ - For rnaAbundance term R and
|
19
|
+
DESCRIPTION = ' +R >> P+ - For rnaAbundance term R and
|
20
|
+
roteinAbundance term P, +R translatedTo P+ or
|
21
|
+
R >> P+ indicates that members of P are produced
|
22
|
+
y the translation of members of R. For example:
|
23
|
+
r(HGNC:AKT1) >> p(HGNC:AKT1)+ indicates that
|
24
|
+
KT1 protein is produced by translation of AKT1
|
25
|
+
NA.'.freeze
|
15
26
|
|
16
27
|
def self.short
|
17
28
|
SHORT
|
@@ -5,13 +5,27 @@ module BELParser
|
|
5
5
|
module Language
|
6
6
|
module Version2_0
|
7
7
|
module Relationships
|
8
|
-
# Translocates: +translocation(A, ns1:v1, ns2:v2) translocates
|
8
|
+
# Translocates: +translocation(A, ns1:v1, ns2:v2) translocates
|
9
|
+
# A+ - This relationship links the abundance term in a
|
10
|
+
# +translocation()+ to the translocation. This relationship is
|
11
|
+
# direct because it is a _self_ relationship. The translocated
|
12
|
+
# abundance is directly acted on by the translocation
|
13
|
+
# process. This relationship is introduced by the BEL Compiler
|
14
|
+
# and may not be used by statements in BEL documents.
|
9
15
|
class Translocates
|
10
16
|
extend Relationship
|
11
17
|
|
12
18
|
SHORT = :translocates
|
13
19
|
LONG = :translocates
|
14
|
-
DESCRIPTION = ' +translocation(A, ns1:v1, ns2:v2) translocates
|
20
|
+
DESCRIPTION = ' +translocation(A, ns1:v1, ns2:v2) translocates
|
21
|
+
+ - This relationship links the abundance term
|
22
|
+
n a +translocation()+ to the translocation. This
|
23
|
+
elationship is direct because it is a _self_
|
24
|
+
elationship. The translocated abundance
|
25
|
+
s directly acted on by the translocation
|
26
|
+
rocess. This relationship is introduced by the
|
27
|
+
EL Compiler and may not be used by statements in
|
28
|
+
EL documents.'.freeze
|
15
29
|
|
16
30
|
def self.short
|
17
31
|
SHORT
|
data/lib/bel_parser/language.rb
CHANGED
@@ -7,8 +7,20 @@ require_relative 'language/specification'
|
|
7
7
|
require_relative 'language/expression_validator'
|
8
8
|
|
9
9
|
module BELParser
|
10
|
+
# Language defines the concepts needed to define, represent, and
|
11
|
+
# validate a BEL specification. This includes:
|
12
|
+
#
|
13
|
+
# - {BELParser::Language::Specification BEL specifications}
|
14
|
+
# - Functions
|
15
|
+
# - ReturnTypes
|
16
|
+
# - Signatures
|
17
|
+
# - Relationships
|
18
|
+
# - Encodings
|
19
|
+
# - Syntax validations
|
20
|
+
# - Semantic validations
|
21
|
+
# - Generic Syntax validations
|
22
|
+
# - Generic signature validation
|
10
23
|
module Language
|
11
|
-
|
12
24
|
# Mutex to synchronize creation of BEL specifications.
|
13
25
|
LOCK = Mutex.new
|
14
26
|
private_constant :LOCK
|
@@ -18,12 +30,10 @@ module BELParser
|
|
18
30
|
# @param [#to_s] version the BEL version string (e.g. +"2.0"+)
|
19
31
|
# @return [Boolean] +true+ if +version+ is defined; +false+ if not
|
20
32
|
def self.defines_version?(version)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
false
|
26
|
-
end
|
33
|
+
specification(version)
|
34
|
+
true
|
35
|
+
rescue ArgumentError, LoadError
|
36
|
+
false
|
27
37
|
end
|
28
38
|
|
29
39
|
# Returns all version strings that are defined and supported by this
|
@@ -60,7 +70,7 @@ module BELParser
|
|
60
70
|
def self.specification(version)
|
61
71
|
version_string = version.to_s
|
62
72
|
unless version_string =~ /^[0-9]+\.[0-9]+/
|
63
|
-
raise ArgumentError,
|
73
|
+
raise ArgumentError, 'Version format incorrect; expecting MAJOR.MINOR'
|
64
74
|
end
|
65
75
|
|
66
76
|
LOCK.synchronize do
|