bel_parser 1.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gemspec +28 -0
- data/CHANGELOG.md +10 -0
- data/LICENSE +191 -0
- data/README.md +9 -0
- data/VERSION +1 -0
- data/bin/bel2_termcheck +39 -0
- data/lib/bel_parser.rb +17 -0
- data/lib/bel_parser/ast_filter.rb +27 -0
- data/lib/bel_parser/ast_generator.rb +86 -0
- data/lib/bel_parser/ast_validator.rb +40 -0
- data/lib/bel_parser/expression/parser.rb +42 -0
- data/lib/bel_parser/expression/term_semantics.rb +36 -0
- data/lib/bel_parser/language.rb +7 -0
- data/lib/bel_parser/language/function.rb +59 -0
- data/lib/bel_parser/language/quoting.rb +236 -0
- data/lib/bel_parser/language/semantic_ast.rb +604 -0
- data/lib/bel_parser/language/semantics/analyzer.rb +59 -0
- data/lib/bel_parser/language/signature.rb +39 -0
- data/lib/bel_parser/language/specification.rb +49 -0
- data/lib/bel_parser/language/syntax/expression/incomplete_node.rb +14 -0
- data/lib/bel_parser/language/syntax/expression/invalid_term_function.rb +22 -0
- data/lib/bel_parser/language/version1.rb +50 -0
- data/lib/bel_parser/language/version1/functions/abundance.rb +85 -0
- data/lib/bel_parser/language/version1/functions/biological_process.rb +85 -0
- data/lib/bel_parser/language/version1/functions/catalytic_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/cell_secretion.rb +80 -0
- data/lib/bel_parser/language/version1/functions/cell_surface_expression.rb +80 -0
- data/lib/bel_parser/language/version1/functions/chaperone_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/complex_abundance.rb +115 -0
- data/lib/bel_parser/language/version1/functions/composite_abundance.rb +80 -0
- data/lib/bel_parser/language/version1/functions/degradation.rb +80 -0
- data/lib/bel_parser/language/version1/functions/fusion.rb +302 -0
- data/lib/bel_parser/language/version1/functions/gene_abundance.rb +125 -0
- data/lib/bel_parser/language/version1/functions/gtp_bound_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/kinase_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/list.rb +115 -0
- data/lib/bel_parser/language/version1/functions/micro_rna_abundance.rb +85 -0
- data/lib/bel_parser/language/version1/functions/molecular_activity.rb +80 -0
- data/lib/bel_parser/language/version1/functions/pathology.rb +85 -0
- data/lib/bel_parser/language/version1/functions/peptidase_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/phosphatase_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/products.rb +80 -0
- data/lib/bel_parser/language/version1/functions/protein_abundance.rb +245 -0
- data/lib/bel_parser/language/version1/functions/protein_modification.rb +167 -0
- data/lib/bel_parser/language/version1/functions/reactants.rb +80 -0
- data/lib/bel_parser/language/version1/functions/reaction.rb +85 -0
- data/lib/bel_parser/language/version1/functions/ribosylation_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/rna_abundance.rb +125 -0
- data/lib/bel_parser/language/version1/functions/substitution.rb +96 -0
- data/lib/bel_parser/language/version1/functions/transcriptional_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/translocation.rb +100 -0
- data/lib/bel_parser/language/version1/functions/transport_activity.rb +110 -0
- data/lib/bel_parser/language/version1/functions/truncation.rb +82 -0
- data/lib/bel_parser/language/version1/return_types/abundance.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/any.rb +74 -0
- data/lib/bel_parser/language/version1/return_types/biological_process.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/catalytic_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/chaperone_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/complex_abundance.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/fusion.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/gene_abundance.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/gtp_bound_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/kinase_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/list.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/micro_rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/molecular_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/pathology.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/peptidase_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/phosphatase_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/products.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/protein_abundance.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/protein_modification.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/reactants.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/ribosylation_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/substitution.rb +17 -0
- data/lib/bel_parser/language/version1/return_types/transcriptional_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/transport_activity.rb +20 -0
- data/lib/bel_parser/language/version1/return_types/truncation.rb +17 -0
- data/lib/bel_parser/language/version2.rb +50 -0
- data/lib/bel_parser/language/version2/functions/abundance.rb +165 -0
- data/lib/bel_parser/language/version2/functions/activity.rb +115 -0
- data/lib/bel_parser/language/version2/functions/biological_process.rb +85 -0
- data/lib/bel_parser/language/version2/functions/cell_secretion.rb +80 -0
- data/lib/bel_parser/language/version2/functions/cell_surface_expression.rb +80 -0
- data/lib/bel_parser/language/version2/functions/complex_abundance.rb +190 -0
- data/lib/bel_parser/language/version2/functions/composite_abundance.rb +80 -0
- data/lib/bel_parser/language/version2/functions/degradation.rb +80 -0
- data/lib/bel_parser/language/version2/functions/fragment.rb +119 -0
- data/lib/bel_parser/language/version2/functions/from_location.rb +85 -0
- data/lib/bel_parser/language/version2/functions/fusion.rb +227 -0
- data/lib/bel_parser/language/version2/functions/gene_abundance.rb +195 -0
- data/lib/bel_parser/language/version2/functions/list.rb +115 -0
- data/lib/bel_parser/language/version2/functions/location.rb +85 -0
- data/lib/bel_parser/language/version2/functions/micro_rna_abundance.rb +165 -0
- data/lib/bel_parser/language/version2/functions/molecular_activity.rb +83 -0
- data/lib/bel_parser/language/version2/functions/pathology.rb +85 -0
- data/lib/bel_parser/language/version2/functions/products.rb +80 -0
- data/lib/bel_parser/language/version2/functions/protein_abundance.rb +285 -0
- data/lib/bel_parser/language/version2/functions/protein_modification.rb +167 -0
- data/lib/bel_parser/language/version2/functions/reactants.rb +80 -0
- data/lib/bel_parser/language/version2/functions/reaction.rb +85 -0
- data/lib/bel_parser/language/version2/functions/rna_abundance.rb +195 -0
- data/lib/bel_parser/language/version2/functions/to_location.rb +85 -0
- data/lib/bel_parser/language/version2/functions/translocation.rb +90 -0
- data/lib/bel_parser/language/version2/functions/variant.rb +83 -0
- data/lib/bel_parser/language/version2/return_types/abundance.rb +20 -0
- data/lib/bel_parser/language/version2/return_types/activity.rb +20 -0
- data/lib/bel_parser/language/version2/return_types/any.rb +74 -0
- data/lib/bel_parser/language/version2/return_types/biological_process.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/complex_abundance.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/fragment.rb +20 -0
- data/lib/bel_parser/language/version2/return_types/from_location.rb +20 -0
- data/lib/bel_parser/language/version2/return_types/fusion.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/gene_abundance.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/list.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/location.rb +20 -0
- data/lib/bel_parser/language/version2/return_types/micro_rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/molecular_activity.rb +20 -0
- data/lib/bel_parser/language/version2/return_types/pathology.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/products.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/protein_abundance.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/protein_modification.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/reactants.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version2/return_types/to_location.rb +20 -0
- data/lib/bel_parser/language/version2/return_types/variant.rb +20 -0
- data/lib/bel_parser/mixin/line_continuator.rb +15 -0
- data/lib/bel_parser/mixin/line_mapping.rb +14 -0
- data/lib/bel_parser/parser.rb +54 -0
- data/lib/bel_parser/parsers/ast/mapped_traversal.rb +36 -0
- data/lib/bel_parser/parsers/ast/node.rb +705 -0
- data/lib/bel_parser/parsers/ast/sexp.rb +8 -0
- data/lib/bel_parser/parsers/ast/traversal.rb +21 -0
- data/lib/bel_parser/parsers/bel_script.rb +4 -0
- data/lib/bel_parser/parsers/bel_script/define_annotation.rb +5476 -0
- data/lib/bel_parser/parsers/bel_script/define_annotation.rl +141 -0
- data/lib/bel_parser/parsers/bel_script/define_namespace.rb +1780 -0
- data/lib/bel_parser/parsers/bel_script/define_namespace.rl +121 -0
- data/lib/bel_parser/parsers/bel_script/set.rb +4556 -0
- data/lib/bel_parser/parsers/bel_script/set.rl +116 -0
- data/lib/bel_parser/parsers/bel_script/unset.rb +706 -0
- data/lib/bel_parser/parsers/bel_script/unset.rl +95 -0
- data/lib/bel_parser/parsers/common.rb +5 -0
- data/lib/bel_parser/parsers/common/blank_line.rb +211 -0
- data/lib/bel_parser/parsers/common/blank_line.rl +81 -0
- data/lib/bel_parser/parsers/common/comment_line.rb +245 -0
- data/lib/bel_parser/parsers/common/comment_line.rl +97 -0
- data/lib/bel_parser/parsers/common/common.rb +7 -0
- data/lib/bel_parser/parsers/common/common.rl +13 -0
- data/lib/bel_parser/parsers/common/identifier.rb +289 -0
- data/lib/bel_parser/parsers/common/identifier.rl +106 -0
- data/lib/bel_parser/parsers/common/list.rb +2142 -0
- data/lib/bel_parser/parsers/common/list.rl +144 -0
- data/lib/bel_parser/parsers/common/string.rb +271 -0
- data/lib/bel_parser/parsers/common/string.rl +107 -0
- data/lib/bel_parser/parsers/expression.rb +7 -0
- data/lib/bel_parser/parsers/expression/comment.rb +239 -0
- data/lib/bel_parser/parsers/expression/comment.rl +97 -0
- data/lib/bel_parser/parsers/expression/parameter.rb +1506 -0
- data/lib/bel_parser/parsers/expression/parameter.rl +97 -0
- data/lib/bel_parser/parsers/expression/relationship.rb +254 -0
- data/lib/bel_parser/parsers/expression/relationship.rl +98 -0
- data/lib/bel_parser/parsers/expression/statement_nested.rb +17802 -0
- data/lib/bel_parser/parsers/expression/statement_nested.rl +141 -0
- data/lib/bel_parser/parsers/expression/statement_observed_term.rb +7291 -0
- data/lib/bel_parser/parsers/expression/statement_observed_term.rl +92 -0
- data/lib/bel_parser/parsers/expression/statement_simple.rb +10475 -0
- data/lib/bel_parser/parsers/expression/statement_simple.rl +112 -0
- data/lib/bel_parser/parsers/expression/term.rb +3989 -0
- data/lib/bel_parser/parsers/expression/term.rl +157 -0
- data/lib/bel_parser/parsers/line_parser.rb +92 -0
- data/lib/bel_parser/parsers/mixin/buffer.rb +10 -0
- data/lib/bel_parser/parsers/nonblocking_io_wrapper.rb +50 -0
- data/lib/bel_parser/script/parser.rb +49 -0
- data/lib/bel_parser/vendor/ast.rb +17 -0
- data/lib/bel_parser/vendor/ast/node.rb +254 -0
- data/lib/bel_parser/vendor/ast/processor.rb +12 -0
- data/lib/bel_parser/vendor/ast/processor/mixin.rb +282 -0
- data/lib/bel_parser/vendor/ast/sexp.rb +30 -0
- metadata +226 -0
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative '../../version1'
|
2
|
+
require_relative '../../function'
|
3
|
+
require_relative '../../signature'
|
4
|
+
require_relative '../../semantic_ast'
|
5
|
+
|
6
|
+
module BELParser
|
7
|
+
module Language
|
8
|
+
module Version2
|
9
|
+
module Functions
|
10
|
+
# Degradation: Denotes the frequency or abundance of events in which a member is degraded in some way such that it is no longer a member.
|
11
|
+
class Degradation
|
12
|
+
extend Function
|
13
|
+
|
14
|
+
SHORT = :deg
|
15
|
+
LONG = :degradation
|
16
|
+
RETURN_TYPE = BELParser::Language::Version2::ReturnTypes::Abundance
|
17
|
+
DESCRIPTION = 'Denotes the frequency or abundance of events in which a member is degraded in some way such that it is no longer a member.'.freeze
|
18
|
+
|
19
|
+
def self.short
|
20
|
+
SHORT
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.long
|
24
|
+
LONG
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.return_type
|
28
|
+
RETURN_TYPE
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.description
|
32
|
+
DESCRIPTION
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.signatures
|
36
|
+
SIGNATURES
|
37
|
+
end
|
38
|
+
|
39
|
+
module Signatures
|
40
|
+
|
41
|
+
class DegradationSignature
|
42
|
+
extend BELParser::Language::Signature
|
43
|
+
|
44
|
+
private_class_method :new
|
45
|
+
|
46
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
47
|
+
term(
|
48
|
+
function(
|
49
|
+
identifier(
|
50
|
+
function_of(Degradation))),
|
51
|
+
argument(
|
52
|
+
term(
|
53
|
+
function(
|
54
|
+
identifier(
|
55
|
+
return_type_of(BELParser::Language::Version2::ReturnTypes::Abundance))))))
|
56
|
+
end
|
57
|
+
private_constant :AST
|
58
|
+
|
59
|
+
STRING_FORM = 'degradation(F:abundance)abundance'.freeze
|
60
|
+
private_constant :STRING_FORM
|
61
|
+
|
62
|
+
def self.semantic_ast
|
63
|
+
AST
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.string_form
|
67
|
+
STRING_FORM
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
SIGNATURES = Signatures.constants.map do |const|
|
74
|
+
Signatures.const_get(const)
|
75
|
+
end.freeze
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require_relative '../../version1'
|
2
|
+
require_relative '../../function'
|
3
|
+
require_relative '../../signature'
|
4
|
+
require_relative '../../semantic_ast'
|
5
|
+
|
6
|
+
module BELParser
|
7
|
+
module Language
|
8
|
+
module Version2
|
9
|
+
module Functions
|
10
|
+
# Fragment: Denotes a protein fragment, e.g., a product of proteolytic cleavage.
|
11
|
+
class Fragment
|
12
|
+
extend Function
|
13
|
+
|
14
|
+
SHORT = :frag
|
15
|
+
LONG = :fragment
|
16
|
+
RETURN_TYPE = BELParser::Language::Version2::ReturnTypes::Fragment
|
17
|
+
DESCRIPTION = 'Denotes a protein fragment, e.g., a product of proteolytic cleavage.'.freeze
|
18
|
+
|
19
|
+
def self.short
|
20
|
+
SHORT
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.long
|
24
|
+
LONG
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.return_type
|
28
|
+
RETURN_TYPE
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.description
|
32
|
+
DESCRIPTION
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.signatures
|
36
|
+
SIGNATURES
|
37
|
+
end
|
38
|
+
|
39
|
+
module Signatures
|
40
|
+
|
41
|
+
class FragmentWithRangeSignature
|
42
|
+
extend BELParser::Language::Signature
|
43
|
+
|
44
|
+
private_class_method :new
|
45
|
+
|
46
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
47
|
+
term(
|
48
|
+
function(
|
49
|
+
identifier(
|
50
|
+
function_of(Fragment))),
|
51
|
+
argument(
|
52
|
+
parameter(
|
53
|
+
prefix(any),
|
54
|
+
value(
|
55
|
+
value_type(
|
56
|
+
is_amino_acid_range_pattern)))))
|
57
|
+
end
|
58
|
+
private_constant :AST
|
59
|
+
|
60
|
+
STRING_FORM = 'fragment(E:aminoAcidRange)abundance'.freeze
|
61
|
+
private_constant :STRING_FORM
|
62
|
+
|
63
|
+
def self.semantic_ast
|
64
|
+
AST
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.string_form
|
68
|
+
STRING_FORM
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class FragmentWithRangeDescriptorSignature
|
73
|
+
extend BELParser::Language::Signature
|
74
|
+
|
75
|
+
private_class_method :new
|
76
|
+
|
77
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
78
|
+
term(
|
79
|
+
function(
|
80
|
+
identifier(
|
81
|
+
function_of(Fragment))),
|
82
|
+
argument(
|
83
|
+
parameter(
|
84
|
+
prefix(any),
|
85
|
+
value(
|
86
|
+
value_type(
|
87
|
+
is_amino_acid_range_pattern)))),
|
88
|
+
argument(
|
89
|
+
parameter(
|
90
|
+
prefix(
|
91
|
+
any),
|
92
|
+
value(
|
93
|
+
value_type(
|
94
|
+
encoding_of(:*))))))
|
95
|
+
end
|
96
|
+
private_constant :AST
|
97
|
+
|
98
|
+
STRING_FORM = 'fragment(E:aminoAcidRange,E:*)abundance'.freeze
|
99
|
+
private_constant :STRING_FORM
|
100
|
+
|
101
|
+
def self.semantic_ast
|
102
|
+
AST
|
103
|
+
end
|
104
|
+
|
105
|
+
def self.string_form
|
106
|
+
STRING_FORM
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
SIGNATURES = Signatures.constants.map do |const|
|
113
|
+
Signatures.const_get(const)
|
114
|
+
end.freeze
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require_relative '../../version1'
|
2
|
+
require_relative '../../function'
|
3
|
+
require_relative '../../signature'
|
4
|
+
require_relative '../../semantic_ast'
|
5
|
+
|
6
|
+
module BELParser
|
7
|
+
module Language
|
8
|
+
module Version2
|
9
|
+
module Functions
|
10
|
+
# FromLocation: Denotes the from cellular location of the abundance.
|
11
|
+
class FromLocation
|
12
|
+
extend Function
|
13
|
+
|
14
|
+
SHORT = :fromLoc
|
15
|
+
LONG = :fromLocation
|
16
|
+
RETURN_TYPE = BELParser::Language::Version2::ReturnTypes::FromLocation
|
17
|
+
DESCRIPTION = 'Denotes the from cellular location of the abundance.'.freeze
|
18
|
+
|
19
|
+
def self.short
|
20
|
+
SHORT
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.long
|
24
|
+
LONG
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.return_type
|
28
|
+
RETURN_TYPE
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.description
|
32
|
+
DESCRIPTION
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.signatures
|
36
|
+
SIGNATURES
|
37
|
+
end
|
38
|
+
|
39
|
+
module Signatures
|
40
|
+
|
41
|
+
class FromLocationSignature
|
42
|
+
extend BELParser::Language::Signature
|
43
|
+
|
44
|
+
private_class_method :new
|
45
|
+
|
46
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
47
|
+
term(
|
48
|
+
function(
|
49
|
+
identifier(
|
50
|
+
function_of(FromLocation))),
|
51
|
+
argument(
|
52
|
+
parameter(
|
53
|
+
prefix(
|
54
|
+
identifier(
|
55
|
+
has_namespace,
|
56
|
+
namespace_of(:*))),
|
57
|
+
value(
|
58
|
+
value_type(
|
59
|
+
has_encoding,
|
60
|
+
encoding_of(:Location))))))
|
61
|
+
end
|
62
|
+
private_constant :AST
|
63
|
+
|
64
|
+
STRING_FORM = 'fromLocation(E:location)fromLocation'.freeze
|
65
|
+
private_constant :STRING_FORM
|
66
|
+
|
67
|
+
def self.semantic_ast
|
68
|
+
AST
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.string_form
|
72
|
+
STRING_FORM
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
SIGNATURES = Signatures.constants.map do |const|
|
79
|
+
Signatures.const_get(const)
|
80
|
+
end.freeze
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,227 @@
|
|
1
|
+
require_relative '../../version1'
|
2
|
+
require_relative '../../function'
|
3
|
+
require_relative '../../signature'
|
4
|
+
require_relative '../../semantic_ast'
|
5
|
+
|
6
|
+
module BELParser
|
7
|
+
module Language
|
8
|
+
module Version2
|
9
|
+
module Functions
|
10
|
+
# Fusion: Specifies the abundance of a protein translated from the fusion of a gene.
|
11
|
+
class Fusion
|
12
|
+
extend Function
|
13
|
+
|
14
|
+
SHORT = :fus
|
15
|
+
LONG = :fusion
|
16
|
+
RETURN_TYPE = BELParser::Language::Version2::ReturnTypes::Fusion
|
17
|
+
DESCRIPTION = 'Specifies the abundance of a protein translated from the fusion of a gene.'.freeze
|
18
|
+
|
19
|
+
def self.short
|
20
|
+
SHORT
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.long
|
24
|
+
LONG
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.return_type
|
28
|
+
RETURN_TYPE
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.description
|
32
|
+
DESCRIPTION
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.signatures
|
36
|
+
SIGNATURES
|
37
|
+
end
|
38
|
+
|
39
|
+
module Signatures
|
40
|
+
|
41
|
+
class FusionWithGeneEncodingSignature
|
42
|
+
extend BELParser::Language::Signature
|
43
|
+
|
44
|
+
private_class_method :new
|
45
|
+
|
46
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
47
|
+
term(
|
48
|
+
function(
|
49
|
+
identifier(
|
50
|
+
function_of(Fusion))),
|
51
|
+
argument(
|
52
|
+
parameter(
|
53
|
+
prefix(
|
54
|
+
identifier(
|
55
|
+
has_namespace,
|
56
|
+
namespace_of(:*))),
|
57
|
+
value(
|
58
|
+
value_type(
|
59
|
+
has_encoding,
|
60
|
+
encoding_of(:GeneAbundance))))),
|
61
|
+
argument(
|
62
|
+
parameter(
|
63
|
+
prefix(
|
64
|
+
any),
|
65
|
+
value(
|
66
|
+
value_type(
|
67
|
+
encoding_of(:*))))),
|
68
|
+
argument(
|
69
|
+
parameter(
|
70
|
+
prefix(
|
71
|
+
identifier(
|
72
|
+
has_namespace,
|
73
|
+
namespace_of(:*))),
|
74
|
+
value(
|
75
|
+
value_type(
|
76
|
+
has_encoding,
|
77
|
+
encoding_of(:GeneAbundance))))),
|
78
|
+
argument(
|
79
|
+
parameter(
|
80
|
+
prefix(
|
81
|
+
any),
|
82
|
+
value(
|
83
|
+
value_type(
|
84
|
+
encoding_of(:*))))))
|
85
|
+
end
|
86
|
+
private_constant :AST
|
87
|
+
|
88
|
+
STRING_FORM = 'fusion(E:geneAbundance,E:*,E:geneAbundance,E:*)fusion'.freeze
|
89
|
+
private_constant :STRING_FORM
|
90
|
+
|
91
|
+
def self.semantic_ast
|
92
|
+
AST
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.string_form
|
96
|
+
STRING_FORM
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
class FusionWithProteinEncodingSignature
|
101
|
+
extend BELParser::Language::Signature
|
102
|
+
|
103
|
+
private_class_method :new
|
104
|
+
|
105
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
106
|
+
term(
|
107
|
+
function(
|
108
|
+
identifier(
|
109
|
+
function_of(Fusion))),
|
110
|
+
argument(
|
111
|
+
parameter(
|
112
|
+
prefix(
|
113
|
+
identifier(
|
114
|
+
has_namespace,
|
115
|
+
namespace_of(:*))),
|
116
|
+
value(
|
117
|
+
value_type(
|
118
|
+
has_encoding,
|
119
|
+
encoding_of(:ProteinAbundance))))),
|
120
|
+
argument(
|
121
|
+
parameter(
|
122
|
+
prefix(
|
123
|
+
any),
|
124
|
+
value(
|
125
|
+
value_type(
|
126
|
+
encoding_of(:*))))),
|
127
|
+
argument(
|
128
|
+
parameter(
|
129
|
+
prefix(
|
130
|
+
identifier(
|
131
|
+
has_namespace,
|
132
|
+
namespace_of(:*))),
|
133
|
+
value(
|
134
|
+
value_type(
|
135
|
+
has_encoding,
|
136
|
+
encoding_of(:ProteinAbundance))))),
|
137
|
+
argument(
|
138
|
+
parameter(
|
139
|
+
prefix(
|
140
|
+
any),
|
141
|
+
value(
|
142
|
+
value_type(
|
143
|
+
encoding_of(:*))))))
|
144
|
+
end
|
145
|
+
private_constant :AST
|
146
|
+
|
147
|
+
STRING_FORM = 'fusion(E:proteinAbundance,E:*,E:proteinAbundance,E:*)fusion'.freeze
|
148
|
+
private_constant :STRING_FORM
|
149
|
+
|
150
|
+
def self.semantic_ast
|
151
|
+
AST
|
152
|
+
end
|
153
|
+
|
154
|
+
def self.string_form
|
155
|
+
STRING_FORM
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
class FusionWithRNAEncodingSignature
|
160
|
+
extend BELParser::Language::Signature
|
161
|
+
|
162
|
+
private_class_method :new
|
163
|
+
|
164
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
165
|
+
term(
|
166
|
+
function(
|
167
|
+
identifier(
|
168
|
+
function_of(Fusion))),
|
169
|
+
argument(
|
170
|
+
parameter(
|
171
|
+
prefix(
|
172
|
+
identifier(
|
173
|
+
has_namespace,
|
174
|
+
namespace_of(:*))),
|
175
|
+
value(
|
176
|
+
value_type(
|
177
|
+
has_encoding,
|
178
|
+
encoding_of(:RnaAbundance))))),
|
179
|
+
argument(
|
180
|
+
parameter(
|
181
|
+
prefix(
|
182
|
+
any),
|
183
|
+
value(
|
184
|
+
value_type(
|
185
|
+
encoding_of(:*))))),
|
186
|
+
argument(
|
187
|
+
parameter(
|
188
|
+
prefix(
|
189
|
+
identifier(
|
190
|
+
has_namespace,
|
191
|
+
namespace_of(:*))),
|
192
|
+
value(
|
193
|
+
value_type(
|
194
|
+
has_encoding,
|
195
|
+
encoding_of(:RnaAbundance))))),
|
196
|
+
argument(
|
197
|
+
parameter(
|
198
|
+
prefix(
|
199
|
+
any),
|
200
|
+
value(
|
201
|
+
value_type(
|
202
|
+
encoding_of(:*))))))
|
203
|
+
end
|
204
|
+
private_constant :AST
|
205
|
+
|
206
|
+
STRING_FORM = 'fusion(E:rnaAbundance,E:*,E:rnaAbundance,E:*)fusion'.freeze
|
207
|
+
private_constant :STRING_FORM
|
208
|
+
|
209
|
+
def self.semantic_ast
|
210
|
+
AST
|
211
|
+
end
|
212
|
+
|
213
|
+
def self.string_form
|
214
|
+
STRING_FORM
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
|
220
|
+
SIGNATURES = Signatures.constants.map do |const|
|
221
|
+
Signatures.const_get(const)
|
222
|
+
end.freeze
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|