bel_parser 1.0.0.alpha.1 → 1.0.0.alpha.2
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_termcheck +2 -2
- data/lib/bel_parser/expression/term_semantics.rb +2 -2
- data/lib/bel_parser/language/expression_validator.rb +42 -0
- data/lib/bel_parser/language/function.rb +8 -0
- data/lib/bel_parser/language/relationship.rb +57 -0
- data/lib/bel_parser/language/{semantic_ast.rb → semantics/semantic_ast.rb} +5 -27
- data/lib/bel_parser/language/semantics/semantic_match.rb +28 -0
- data/lib/bel_parser/language/semantics.rb +2 -0
- data/lib/bel_parser/language/specification.rb +34 -10
- data/lib/bel_parser/language/syntax.rb +0 -0
- data/lib/bel_parser/language/{version1 → version1_0}/functions/abundance.rb +4 -4
- data/lib/bel_parser/language/{version1 → version1_0}/functions/biological_process.rb +4 -4
- data/lib/bel_parser/language/{version1 → version1_0}/functions/catalytic_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/cell_secretion.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/cell_surface_expression.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/chaperone_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/complex_abundance.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/composite_abundance.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/degradation.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/fusion.rb +4 -4
- data/lib/bel_parser/language/{version1 → version1_0}/functions/gene_abundance.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/gtp_bound_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/kinase_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/list.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/micro_rna_abundance.rb +4 -4
- data/lib/bel_parser/language/{version1 → version1_0}/functions/molecular_activity.rb +5 -5
- data/lib/bel_parser/language/{version2 → version1_0}/functions/pathology.rb +4 -4
- data/lib/bel_parser/language/{version1 → version1_0}/functions/peptidase_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/phosphatase_activity.rb +6 -6
- data/lib/bel_parser/language/{version2 → version1_0}/functions/products.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/protein_abundance.rb +8 -8
- data/lib/bel_parser/language/{version1 → version1_0}/functions/protein_modification.rb +4 -4
- data/lib/bel_parser/language/{version2 → version1_0}/functions/reactants.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/reaction.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/ribosylation_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/rna_abundance.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/substitution.rb +4 -4
- data/lib/bel_parser/language/{version1 → version1_0}/functions/transcriptional_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/translocation.rb +5 -5
- data/lib/bel_parser/language/{version1 → version1_0}/functions/transport_activity.rb +6 -6
- data/lib/bel_parser/language/{version1 → version1_0}/functions/truncation.rb +4 -4
- data/lib/bel_parser/language/version1_0/relationships/acts_in.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/analogous.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/association.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/biomarker_for.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/causes_no_change.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/decreases.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/directly_decreases.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/directly_increases.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/has_component.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/has_components.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/has_member.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/has_members.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/has_modification.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/has_product.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/has_variant.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/includes.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/increases.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/is_a.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/negative_correlation.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/orthologous.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/positive_correlation.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/prognostic_biomarker_for.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/rate_limiting_step_of.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/reactant_in.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/sub_process_of.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/transcribed_to.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/translated_to.rb +31 -0
- data/lib/bel_parser/language/version1_0/relationships/translocates.rb +31 -0
- data/lib/bel_parser/language/{version2 → version1_0}/return_types/abundance.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/any.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/biological_process.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/catalytic_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/chaperone_activity.rb +1 -1
- data/lib/bel_parser/language/{version2 → version1_0}/return_types/complex_abundance.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/fusion.rb +1 -1
- data/lib/bel_parser/language/{version2 → version1_0}/return_types/gene_abundance.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/gtp_bound_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/kinase_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/list.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/micro_rna_abundance.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/molecular_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/pathology.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/peptidase_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/phosphatase_activity.rb +1 -1
- data/lib/bel_parser/language/{version2 → version1_0}/return_types/products.rb +1 -1
- data/lib/bel_parser/language/{version2 → version1_0}/return_types/protein_abundance.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/protein_modification.rb +1 -1
- data/lib/bel_parser/language/{version2 → version1_0}/return_types/reactants.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/ribosylation_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/rna_abundance.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/substitution.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/transcriptional_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/transport_activity.rb +1 -1
- data/lib/bel_parser/language/{version1 → version1_0}/return_types/truncation.rb +1 -1
- data/lib/bel_parser/language/version1_0/syntax/function.rb +29 -0
- data/lib/bel_parser/language/version1_0.rb +89 -0
- data/lib/bel_parser/language/{version2 → version2_0}/functions/abundance.rb +6 -6
- data/lib/bel_parser/language/{version2 → version2_0}/functions/activity.rb +7 -7
- data/lib/bel_parser/language/{version2 → version2_0}/functions/biological_process.rb +4 -4
- data/lib/bel_parser/language/{version2 → version2_0}/functions/cell_secretion.rb +5 -5
- data/lib/bel_parser/language/{version2 → version2_0}/functions/cell_surface_expression.rb +5 -5
- data/lib/bel_parser/language/{version2 → version2_0}/functions/complex_abundance.rb +8 -8
- data/lib/bel_parser/language/{version2 → version2_0}/functions/composite_abundance.rb +5 -5
- data/lib/bel_parser/language/{version2 → version2_0}/functions/degradation.rb +5 -5
- data/lib/bel_parser/language/{version2 → version2_0}/functions/fragment.rb +4 -4
- data/lib/bel_parser/language/{version2 → version2_0}/functions/from_location.rb +4 -4
- data/lib/bel_parser/language/{version2 → version2_0}/functions/fusion.rb +4 -4
- data/lib/bel_parser/language/{version2 → version2_0}/functions/gene_abundance.rb +7 -7
- data/lib/bel_parser/language/{version2 → version2_0}/functions/list.rb +5 -5
- data/lib/bel_parser/language/{version2 → version2_0}/functions/location.rb +4 -4
- data/lib/bel_parser/language/{version2 → version2_0}/functions/micro_rna_abundance.rb +6 -6
- data/lib/bel_parser/language/{version2 → version2_0}/functions/molecular_activity.rb +4 -4
- data/lib/bel_parser/language/{version1 → version2_0}/functions/pathology.rb +4 -4
- data/lib/bel_parser/language/{version1 → version2_0}/functions/products.rb +5 -5
- data/lib/bel_parser/language/{version2 → version2_0}/functions/protein_abundance.rb +9 -9
- data/lib/bel_parser/language/{version2 → version2_0}/functions/protein_modification.rb +7 -7
- data/lib/bel_parser/language/{version1 → version2_0}/functions/reactants.rb +5 -5
- data/lib/bel_parser/language/{version2 → version2_0}/functions/reaction.rb +6 -6
- data/lib/bel_parser/language/{version2 → version2_0}/functions/rna_abundance.rb +11 -11
- data/lib/bel_parser/language/{version2 → version2_0}/functions/to_location.rb +4 -4
- data/lib/bel_parser/language/{version2 → version2_0}/functions/translocation.rb +8 -8
- data/lib/bel_parser/language/{version2 → version2_0}/functions/variant.rb +4 -4
- data/lib/bel_parser/language/version2_0/relationships/acts_in.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/analogous.rb +35 -0
- data/lib/bel_parser/language/version2_0/relationships/association.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/biomarker_for.rb +35 -0
- data/lib/bel_parser/language/version2_0/relationships/causes_no_change.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/decreases.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/directly_decreases.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/directly_increases.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/has_component.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/has_components.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/has_member.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/has_members.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/has_modification.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/has_product.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/has_variant.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/includes.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/increases.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/is_a.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/negative_correlation.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/orthologous.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/positive_correlation.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/prognostic_biomarker_for.rb +35 -0
- data/lib/bel_parser/language/version2_0/relationships/rate_limiting_step_of.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/reactant_in.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/regulates.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/sub_process_of.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/transcribed_to.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/translated_to.rb +31 -0
- data/lib/bel_parser/language/version2_0/relationships/translocates.rb +31 -0
- data/lib/bel_parser/language/{version1 → version2_0}/return_types/abundance.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/activity.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/any.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/biological_process.rb +1 -1
- data/lib/bel_parser/language/{version1 → version2_0}/return_types/complex_abundance.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/fragment.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/from_location.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/fusion.rb +1 -1
- data/lib/bel_parser/language/{version1 → version2_0}/return_types/gene_abundance.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/list.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/location.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/micro_rna_abundance.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/molecular_activity.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/pathology.rb +1 -1
- data/lib/bel_parser/language/{version1 → version2_0}/return_types/products.rb +1 -1
- data/lib/bel_parser/language/{version1 → version2_0}/return_types/protein_abundance.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/protein_modification.rb +1 -1
- data/lib/bel_parser/language/{version1 → version2_0}/return_types/reactants.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/rna_abundance.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/to_location.rb +1 -1
- data/lib/bel_parser/language/{version2 → version2_0}/return_types/variant.rb +1 -1
- data/lib/bel_parser/language/version2_0.rb +73 -0
- data/lib/bel_parser/language.rb +90 -2
- data/lib/bel_parser/parsers/ast/node.rb +11 -1
- metadata +172 -111
- data/lib/bel_parser/language/syntax/expression/incomplete_node.rb +0 -14
- data/lib/bel_parser/language/syntax/expression/invalid_term_function.rb +0 -22
- data/lib/bel_parser/language/version1.rb +0 -50
- data/lib/bel_parser/language/version2.rb +0 -50
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# IsA: +A isA B+ - For terms A and B, +A isA B+ indicates that A is a subset of B. All terms in BEL represent classes, but given that classes implicitly have instances, one can also interpret +A isA B+ to mean that any instance of A must also be an instance of B. This relationship can be used to represent GO and MeSH hierarchies: +pathology(MESH:Psoriasis) isA pathology(MESH:"Skin Diseases")+
|
9
|
+
class IsA
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :isA
|
13
|
+
LONG = :isA
|
14
|
+
DESCRIPTION = ' +A isA B+ - For terms A and B, +A isA B+ indicates that A is a subset of B. All terms in BEL represent classes, but given that classes implicitly have instances, one can also interpret +A isA B+ to mean that any instance of A must also be an instance of B. This relationship can be used to represent GO and MeSH hierarchies: +pathology(MESH:Psoriasis) isA pathology(MESH:"Skin Diseases")+'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# NegativeCorrelation: +A negativeCorrelation B+ - For terms A and B, +A negativeCorrelation B+ indicates that changes in A and B have been observed to be negatively correlated. The order of the subject and object does not affect the interpretation of the statement, thus B negativeCorrelation A is equivalent to A negativeCorrelation B.
|
9
|
+
class NegativeCorrelation
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :negativeCorrelation
|
13
|
+
LONG = :negativeCorrelation
|
14
|
+
DESCRIPTION = ' +A negativeCorrelation B+ - For terms A and B, +A negativeCorrelation B+ indicates that changes in A and B have been observed to be negatively correlated. The order of the subject and object does not affect the interpretation of the statement, thus B negativeCorrelation A is equivalent to A negativeCorrelation B.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# Orthologous: +A orthologous B+ - For geneAbundance terms A and B, +A orthologousTo B+ indicates that A and B represent abundances of genes in different species which are sequence similar and which are therefore presumed to share a common ancestral gene. For example, +g(HGNC:AKT1) orthologousTo g(MGI:AKT1)+ indicates that the mouse and human AKT1 genes are orthologous.
|
9
|
+
class Orthologous
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :orthologous
|
13
|
+
LONG = :orthologous
|
14
|
+
DESCRIPTION = ' +A orthologous B+ - For geneAbundance terms A and B, +A orthologousTo B+ indicates that A and B represent abundances of genes in different species which are sequence similar and which are therefore presumed to share a common ancestral gene. For example, +g(HGNC:AKT1) orthologousTo g(MGI:AKT1)+ indicates that the mouse and human AKT1 genes are orthologous.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# PositiveCorrelation: +A positiveCorrelation B+ - For terms A and B, +A positiveCorrelation B+ indicates that changes in A and B have been observed to be positively correlated, thus B positiveCorrelation A is equivalent to A positiveCorrelation B.
|
9
|
+
class PositiveCorrelation
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :positiveCorrelation
|
13
|
+
LONG = :positiveCorrelation
|
14
|
+
DESCRIPTION = ' +A positiveCorrelation B+ - For terms A and B, +A positiveCorrelation B+ indicates that changes in A and B have been observed to be positively correlated, thus B positiveCorrelation A is equivalent to A positiveCorrelation B.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# PrognosticBiomarkerFor: +A prognosticBiomarkerFor P+ - For term A and process term P, +A prognosticBiomarkerFor P+ indicates that changes in or detection of A is used in some way to be a prognostic biomarker for the subsequent development of pathology or biological process P.
|
9
|
+
class PrognosticBiomarkerFor
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :prognosticBiomarkerFor
|
13
|
+
LONG = :prognosticBiomarkerFor
|
14
|
+
DESCRIPTION = ' +A prognosticBiomarkerFor P+ - For term A and process term P, +A prognosticBiomarkerFor P+ indicates that changes in or detection of A is used in some way to be a prognostic biomarker for the subsequent development of pathology or biological process P.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# RateLimitingStepOf: +A rateLimitingStepOf B+ - For process, activity, or transformation term A and process term B, +A rateLimitingStepOf B+ indicates +A subProcessOf B+ and +A -> B+. For example, the catalytic activity of HMG CoA reductase is a rate-limiting step for cholesterol biosynthesis: <pre> <code> cat(p(HGNC:HMGCR)) rateLimitingStepOf\ bp(GO:"cholesterol biosynthetic process") </code> </pre>
|
9
|
+
class RateLimitingStepOf
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :rateLimitingStepOf
|
13
|
+
LONG = :rateLimitingStepOf
|
14
|
+
DESCRIPTION = ' +A rateLimitingStepOf B+ - For process, activity, or transformation term A and process term B, +A rateLimitingStepOf B+ indicates +A subProcessOf B+ and +A -> B+. For example, the catalytic activity of HMG CoA reductase is a rate-limiting step for cholesterol biosynthesis: <pre> <code> cat(p(HGNC:HMGCR)) rateLimitingStepOf\ bp(GO:"cholesterol biosynthetic process") </code> </pre>'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# ReactantIn: +A reactantIn reaction(reactants(A), products(B))+ - This relationship links abundance terms from the +reactants(<list>)+ in a reaction to the reaction. This is a direct relationship because it is a _self_ relationship. Reactants are consumed directly by a reaction. This relationship is introduced by the BEL Compiler and may not be used by statements in BEL documents.
|
9
|
+
class ReactantIn
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :reactantIn
|
13
|
+
LONG = :reactantIn
|
14
|
+
DESCRIPTION = ' +A reactantIn reaction(reactants(A), products(B))+ - This relationship links abundance terms from the +reactants(<list>)+ in a reaction to the reaction. This is a direct relationship because it is a _self_ relationship. Reactants are consumed directly by a reaction. This relationship is introduced by the BEL Compiler and may not be used by statements in BEL documents.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# SubProcessOf: +A subProcessOf B+ - For process, activity, or transformation term A and process term B, +A subProcessOf B+ indicates that instances of process B, by default, include one or more instances of A in their composition. For example, the reduction of HMG-CoA to mevalonate is a subprocess of cholesterol biosynthesis: <pre> <code> rxn(reactants(a(CHEBI:"(S)-3-hydroxy-3-methylglutaryl-CoA"),\ a(CHEBI:NADPH), a(CHEBI:hydron)), products(a(CHEBI:Mevalonate),\ a(CHEBI:"CoA-SH"), a(CHEBI:"NADP+"))) subProcessOf bp(GO:"cholesterol\ biosynthetic process") </code> </pre>
|
9
|
+
class SubProcessOf
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :subProcessOf
|
13
|
+
LONG = :subProcessOf
|
14
|
+
DESCRIPTION = ' +A subProcessOf B+ - For process, activity, or transformation term A and process term B, +A subProcessOf B+ indicates that instances of process B, by default, include one or more instances of A in their composition. For example, the reduction of HMG-CoA to mevalonate is a subprocess of cholesterol biosynthesis: <pre> <code> rxn(reactants(a(CHEBI:"(S)-3-hydroxy-3-methylglutaryl-CoA"),\ a(CHEBI:NADPH), a(CHEBI:hydron)), products(a(CHEBI:Mevalonate),\ a(CHEBI:"CoA-SH"), a(CHEBI:"NADP+"))) subProcessOf bp(GO:"cholesterol\ biosynthetic process") </code> </pre>'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# TranscribedTo: +G :> R+ - For rnaAbundance term R and geneAbundance term G, +G transcribedTo R+ or +G :> R+ indicates that members of R are produced by the transcription of members of G. For example: +g(HGNC:AKT1) :> r(HGNC:AKT1)+ indicates that the human AKT1 RNA is transcribed from the human AKT1 gene.
|
9
|
+
class TranscribedTo
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :':>'
|
13
|
+
LONG = :transcribedTo
|
14
|
+
DESCRIPTION = ' +G :> R+ - For rnaAbundance term R and geneAbundance term G, +G transcribedTo R+ or +G :> R+ indicates that members of R are produced by the transcription of members of G. For example: +g(HGNC:AKT1) :> r(HGNC:AKT1)+ indicates that the human AKT1 RNA is transcribed from the human AKT1 gene.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# TranslatedTo: +R >> P+ - For rnaAbundance term R and proteinAbundance term P, +R translatedTo P+ or +R >> P+ indicates that members of P are produced by the translation of members of R. For example: +r(HGNC:AKT1) >> p(HGNC:AKT1)+ indicates that AKT1 protein is produced by translation of AKT1 RNA.
|
9
|
+
class TranslatedTo
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :>>
|
13
|
+
LONG = :translatedTo
|
14
|
+
DESCRIPTION = ' +R >> P+ - For rnaAbundance term R and proteinAbundance term P, +R translatedTo P+ or +R >> P+ indicates that members of P are produced by the translation of members of R. For example: +r(HGNC:AKT1) >> p(HGNC:AKT1)+ indicates that AKT1 protein is produced by translation of AKT1 RNA.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../relationship'
|
3
|
+
|
4
|
+
module BELParser
|
5
|
+
module Language
|
6
|
+
module Version1_0
|
7
|
+
module Relationships
|
8
|
+
# Translocates: +translocation(A, ns1:v1, ns2:v2) translocates A+ - This relationship links the abundance term in a +translocation()+ to the translocation. This relationship is direct because it is a _self_ relationship. The translocated abundance is directly acted on by the translocation process. This relationship is introduced by the BEL Compiler and may not be used by statements in BEL documents.
|
9
|
+
class Translocates
|
10
|
+
extend Relationship
|
11
|
+
|
12
|
+
SHORT = :translocates
|
13
|
+
LONG = :translocates
|
14
|
+
DESCRIPTION = ' +translocation(A, ns1:v1, ns2:v2) translocates A+ - This relationship links the abundance term in a +translocation()+ to the translocation. This relationship is direct because it is a _self_ relationship. The translocated abundance is directly acted on by the translocation process. This relationship is introduced by the BEL Compiler and may not be used by statements in BEL documents.'.freeze
|
15
|
+
|
16
|
+
def self.short
|
17
|
+
SHORT
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.long
|
21
|
+
LONG
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
DESCRIPTION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'bel_parser/parsers/ast/node'
|
2
|
+
|
3
|
+
module BELParser
|
4
|
+
module Language
|
5
|
+
module Version1_0
|
6
|
+
module Syntax
|
7
|
+
# Function will add syntax errors to
|
8
|
+
# {BELParser::Parsers::AST::Function} nodes that do not have a valid
|
9
|
+
# BEL 1.0 functon name.
|
10
|
+
class Function
|
11
|
+
|
12
|
+
private_class_method :new
|
13
|
+
|
14
|
+
V1 = ::BELParser::Language::Version1_0::Specification.new
|
15
|
+
|
16
|
+
def self.match(input_ast)
|
17
|
+
input_ast.traverse do |node|
|
18
|
+
next unless node.is_a?(BELParser::Parsers::AST::Function)
|
19
|
+
function_name = node.identifier.string_literal
|
20
|
+
unless V1.function(function_name.to_sym)
|
21
|
+
node.add_syntax_error(:FunctionV1)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|