bel_parser 1.0.0.alpha.27-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gemspec-java +32 -0
- data/CHANGELOG.md +10 -0
- data/LICENSE +191 -0
- data/README.md +20 -0
- data/VERSION +1 -0
- data/bin/bel2_validator +62 -0
- data/bin/bel_script_reader +132 -0
- data/lib/bel/translator/plugins/bel_script.rb +38 -0
- data/lib/bel/translator/plugins/bel_script/bel_citation_serialization.rb +125 -0
- data/lib/bel/translator/plugins/bel_script/bel_discrete_serialization.rb +109 -0
- data/lib/bel/translator/plugins/bel_script/bel_top_down_serialization.rb +100 -0
- data/lib/bel/translator/plugins/bel_script/nanopub_serialization.rb +79 -0
- data/lib/bel/translator/plugins/bel_script/reader.rb +39 -0
- data/lib/bel/translator/plugins/bel_script/translator.rb +37 -0
- data/lib/bel/translator/plugins/bel_script/writer.rb +180 -0
- data/lib/bel_parser.rb +23 -0
- data/lib/bel_parser/ast_filter.rb +44 -0
- data/lib/bel_parser/ast_generator.rb +83 -0
- data/lib/bel_parser/expression.rb +3 -0
- data/lib/bel_parser/expression/filter.rb +31 -0
- data/lib/bel_parser/expression/parser.rb +72 -0
- data/lib/bel_parser/expression/validator.rb +79 -0
- data/lib/bel_parser/language.rb +114 -0
- data/lib/bel_parser/language/amino_acid.rb +68 -0
- data/lib/bel_parser/language/apply_namespace_encoding.rb +98 -0
- data/lib/bel_parser/language/base_specification.rb +82 -0
- data/lib/bel_parser/language/covalent_protein_modification.rb +56 -0
- data/lib/bel_parser/language/expression_validator.rb +68 -0
- data/lib/bel_parser/language/function.rb +67 -0
- data/lib/bel_parser/language/relationship.rb +102 -0
- data/lib/bel_parser/language/semantics.rb +40 -0
- data/lib/bel_parser/language/semantics/deeply_nested_statement.rb +65 -0
- data/lib/bel_parser/language/semantics/function_deprecation.rb +43 -0
- data/lib/bel_parser/language/semantics/list_function_subject.rb +45 -0
- data/lib/bel_parser/language/semantics/multiple_subject_object.rb +55 -0
- data/lib/bel_parser/language/semantics/non_causal_nested_statement.rb +50 -0
- data/lib/bel_parser/language/semantics/non_object_list.rb +56 -0
- data/lib/bel_parser/language/semantics/relationship_deprecation.rb +44 -0
- data/lib/bel_parser/language/semantics/relationship_not_listable.rb +60 -0
- data/lib/bel_parser/language/semantics/signature_mapping.rb +83 -0
- data/lib/bel_parser/language/semantics_ast.rb +784 -0
- data/lib/bel_parser/language/semantics_ast_warnings.rb +180 -0
- data/lib/bel_parser/language/semantics_function.rb +16 -0
- data/lib/bel_parser/language/semantics_match.rb +28 -0
- data/lib/bel_parser/language/semantics_result.rb +33 -0
- data/lib/bel_parser/language/semantics_type_warning.rb +22 -0
- data/lib/bel_parser/language/semantics_warning.rb +27 -0
- data/lib/bel_parser/language/signature.rb +39 -0
- data/lib/bel_parser/language/specification.rb +118 -0
- data/lib/bel_parser/language/syntax.rb +38 -0
- data/lib/bel_parser/language/syntax/invalid_function.rb +39 -0
- data/lib/bel_parser/language/syntax/invalid_relationship.rb +42 -0
- data/lib/bel_parser/language/syntax/undefined_namespace.rb +49 -0
- data/lib/bel_parser/language/syntax/undefined_namespace_value.rb +44 -0
- data/lib/bel_parser/language/syntax_error.rb +32 -0
- data/lib/bel_parser/language/syntax_function.rb +16 -0
- data/lib/bel_parser/language/syntax_result.rb +32 -0
- data/lib/bel_parser/language/syntax_warning.rb +27 -0
- data/lib/bel_parser/language/version1_0.rb +20 -0
- data/lib/bel_parser/language/version1_0/functions/abundance.rb +83 -0
- data/lib/bel_parser/language/version1_0/functions/biological_process.rb +83 -0
- data/lib/bel_parser/language/version1_0/functions/catalytic_activity.rb +114 -0
- data/lib/bel_parser/language/version1_0/functions/cell_secretion.rb +83 -0
- data/lib/bel_parser/language/version1_0/functions/cell_surface_expression.rb +83 -0
- data/lib/bel_parser/language/version1_0/functions/chaperone_activity.rb +114 -0
- data/lib/bel_parser/language/version1_0/functions/complex_abundance.rb +115 -0
- data/lib/bel_parser/language/version1_0/functions/composite_abundance.rb +81 -0
- data/lib/bel_parser/language/version1_0/functions/degradation.rb +83 -0
- data/lib/bel_parser/language/version1_0/functions/fusion.rb +287 -0
- data/lib/bel_parser/language/version1_0/functions/gene_abundance.rb +122 -0
- data/lib/bel_parser/language/version1_0/functions/gtp_bound_activity.rb +113 -0
- data/lib/bel_parser/language/version1_0/functions/kinase_activity.rb +114 -0
- data/lib/bel_parser/language/version1_0/functions/list.rb +114 -0
- data/lib/bel_parser/language/version1_0/functions/micro_rna_abundance.rb +85 -0
- data/lib/bel_parser/language/version1_0/functions/molecular_activity.rb +82 -0
- data/lib/bel_parser/language/version1_0/functions/pathology.rb +83 -0
- data/lib/bel_parser/language/version1_0/functions/peptidase_activity.rb +112 -0
- data/lib/bel_parser/language/version1_0/functions/phosphatase_activity.rb +112 -0
- data/lib/bel_parser/language/version1_0/functions/products.rb +79 -0
- data/lib/bel_parser/language/version1_0/functions/protein_abundance.rb +234 -0
- data/lib/bel_parser/language/version1_0/functions/protein_modification.rb +179 -0
- data/lib/bel_parser/language/version1_0/functions/reactants.rb +79 -0
- data/lib/bel_parser/language/version1_0/functions/reaction.rb +86 -0
- data/lib/bel_parser/language/version1_0/functions/ribosylation_activity.rb +114 -0
- data/lib/bel_parser/language/version1_0/functions/rna_abundance.rb +122 -0
- data/lib/bel_parser/language/version1_0/functions/substitution.rb +93 -0
- data/lib/bel_parser/language/version1_0/functions/transcriptional_activity.rb +114 -0
- data/lib/bel_parser/language/version1_0/functions/translocation.rb +98 -0
- data/lib/bel_parser/language/version1_0/functions/transport_activity.rb +115 -0
- data/lib/bel_parser/language/version1_0/functions/truncation.rb +81 -0
- data/lib/bel_parser/language/version1_0/relationships/acts_in.rb +61 -0
- data/lib/bel_parser/language/version1_0/relationships/analogous.rb +41 -0
- data/lib/bel_parser/language/version1_0/relationships/association.rb +42 -0
- data/lib/bel_parser/language/version1_0/relationships/biomarker_for.rb +42 -0
- data/lib/bel_parser/language/version1_0/relationships/causes_no_change.rb +50 -0
- data/lib/bel_parser/language/version1_0/relationships/decreases.rb +63 -0
- data/lib/bel_parser/language/version1_0/relationships/directly_decreases.rb +56 -0
- data/lib/bel_parser/language/version1_0/relationships/directly_increases.rb +56 -0
- data/lib/bel_parser/language/version1_0/relationships/has_component.rb +62 -0
- data/lib/bel_parser/language/version1_0/relationships/has_components.rb +61 -0
- data/lib/bel_parser/language/version1_0/relationships/has_member.rb +48 -0
- data/lib/bel_parser/language/version1_0/relationships/has_members.rb +57 -0
- data/lib/bel_parser/language/version1_0/relationships/has_modification.rb +54 -0
- data/lib/bel_parser/language/version1_0/relationships/has_product.rb +60 -0
- data/lib/bel_parser/language/version1_0/relationships/has_variant.rb +54 -0
- data/lib/bel_parser/language/version1_0/relationships/includes.rb +59 -0
- data/lib/bel_parser/language/version1_0/relationships/increases.rb +63 -0
- data/lib/bel_parser/language/version1_0/relationships/is_a.rb +48 -0
- data/lib/bel_parser/language/version1_0/relationships/negative_correlation.rb +50 -0
- data/lib/bel_parser/language/version1_0/relationships/orthologous.rb +48 -0
- data/lib/bel_parser/language/version1_0/relationships/positive_correlation.rb +46 -0
- data/lib/bel_parser/language/version1_0/relationships/prognostic_biomarker_for.rb +44 -0
- data/lib/bel_parser/language/version1_0/relationships/rate_limiting_step_of.rb +53 -0
- data/lib/bel_parser/language/version1_0/relationships/reactant_in.rb +60 -0
- data/lib/bel_parser/language/version1_0/relationships/sub_process_of.rb +55 -0
- data/lib/bel_parser/language/version1_0/relationships/transcribed_to.rb +53 -0
- data/lib/bel_parser/language/version1_0/relationships/translated_to.rb +54 -0
- data/lib/bel_parser/language/version1_0/relationships/translocates.rb +57 -0
- data/lib/bel_parser/language/version1_0/return_types/abundance.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/any.rb +74 -0
- data/lib/bel_parser/language/version1_0/return_types/biological_process.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/catalytic_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/chaperone_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/complex_abundance.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/fusion.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/gene_abundance.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/gtp_bound_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/kinase_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/list.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/micro_rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/molecular_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/pathology.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/peptidase_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/phosphatase_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/products.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/protein_abundance.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/protein_modification.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/reactants.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/ribosylation_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/substitution.rb +17 -0
- data/lib/bel_parser/language/version1_0/return_types/transcriptional_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/transport_activity.rb +20 -0
- data/lib/bel_parser/language/version1_0/return_types/truncation.rb +17 -0
- data/lib/bel_parser/language/version1_0/value_encodings/abundance.rb +21 -0
- data/lib/bel_parser/language/version1_0/value_encodings/any.rb +74 -0
- data/lib/bel_parser/language/version1_0/value_encodings/biological_process.rb +21 -0
- data/lib/bel_parser/language/version1_0/value_encodings/complex_abundance.rb +21 -0
- data/lib/bel_parser/language/version1_0/value_encodings/gene_abundance.rb +21 -0
- data/lib/bel_parser/language/version1_0/value_encodings/micro_rna_abundance.rb +21 -0
- data/lib/bel_parser/language/version1_0/value_encodings/pathology.rb +21 -0
- data/lib/bel_parser/language/version1_0/value_encodings/protein_abundance.rb +21 -0
- data/lib/bel_parser/language/version1_0/value_encodings/rna_abundance.rb +21 -0
- data/lib/bel_parser/language/version2_0.rb +20 -0
- data/lib/bel_parser/language/version2_0/functions/abundance.rb +161 -0
- data/lib/bel_parser/language/version2_0/functions/activity.rb +118 -0
- data/lib/bel_parser/language/version2_0/functions/biological_process.rb +84 -0
- data/lib/bel_parser/language/version2_0/functions/cell_secretion.rb +83 -0
- data/lib/bel_parser/language/version2_0/functions/cell_surface_expression.rb +83 -0
- data/lib/bel_parser/language/version2_0/functions/complex_abundance.rb +190 -0
- data/lib/bel_parser/language/version2_0/functions/composite_abundance.rb +81 -0
- data/lib/bel_parser/language/version2_0/functions/degradation.rb +83 -0
- data/lib/bel_parser/language/version2_0/functions/fragment.rb +116 -0
- data/lib/bel_parser/language/version2_0/functions/from_location.rb +85 -0
- data/lib/bel_parser/language/version2_0/functions/fusion.rb +203 -0
- data/lib/bel_parser/language/version2_0/functions/gene_abundance.rb +192 -0
- data/lib/bel_parser/language/version2_0/functions/list.rb +114 -0
- data/lib/bel_parser/language/version2_0/functions/location.rb +83 -0
- data/lib/bel_parser/language/version2_0/functions/micro_rna_abundance.rb +163 -0
- data/lib/bel_parser/language/version2_0/functions/molecular_activity.rb +86 -0
- data/lib/bel_parser/language/version2_0/functions/pathology.rb +83 -0
- data/lib/bel_parser/language/version2_0/functions/products.rb +79 -0
- data/lib/bel_parser/language/version2_0/functions/protein_abundance.rb +270 -0
- data/lib/bel_parser/language/version2_0/functions/protein_modification.rb +172 -0
- data/lib/bel_parser/language/version2_0/functions/reactants.rb +79 -0
- data/lib/bel_parser/language/version2_0/functions/reaction.rb +86 -0
- data/lib/bel_parser/language/version2_0/functions/rna_abundance.rb +192 -0
- data/lib/bel_parser/language/version2_0/functions/to_location.rb +84 -0
- data/lib/bel_parser/language/version2_0/functions/translocation.rb +91 -0
- data/lib/bel_parser/language/version2_0/functions/variant.rb +80 -0
- data/lib/bel_parser/language/version2_0/relationships/acts_in.rb +61 -0
- data/lib/bel_parser/language/version2_0/relationships/analogous.rb +45 -0
- data/lib/bel_parser/language/version2_0/relationships/association.rb +42 -0
- data/lib/bel_parser/language/version2_0/relationships/biomarker_for.rb +46 -0
- data/lib/bel_parser/language/version2_0/relationships/causes_no_change.rb +50 -0
- data/lib/bel_parser/language/version2_0/relationships/decreases.rb +63 -0
- data/lib/bel_parser/language/version2_0/relationships/directly_decreases.rb +56 -0
- data/lib/bel_parser/language/version2_0/relationships/directly_increases.rb +56 -0
- data/lib/bel_parser/language/version2_0/relationships/has_component.rb +62 -0
- data/lib/bel_parser/language/version2_0/relationships/has_components.rb +61 -0
- data/lib/bel_parser/language/version2_0/relationships/has_member.rb +48 -0
- data/lib/bel_parser/language/version2_0/relationships/has_members.rb +57 -0
- data/lib/bel_parser/language/version2_0/relationships/has_modification.rb +54 -0
- data/lib/bel_parser/language/version2_0/relationships/has_product.rb +60 -0
- data/lib/bel_parser/language/version2_0/relationships/has_variant.rb +54 -0
- data/lib/bel_parser/language/version2_0/relationships/includes.rb +59 -0
- data/lib/bel_parser/language/version2_0/relationships/increases.rb +63 -0
- data/lib/bel_parser/language/version2_0/relationships/is_a.rb +48 -0
- data/lib/bel_parser/language/version2_0/relationships/negative_correlation.rb +50 -0
- data/lib/bel_parser/language/version2_0/relationships/orthologous.rb +48 -0
- data/lib/bel_parser/language/version2_0/relationships/positive_correlation.rb +46 -0
- data/lib/bel_parser/language/version2_0/relationships/prognostic_biomarker_for.rb +48 -0
- data/lib/bel_parser/language/version2_0/relationships/rate_limiting_step_of.rb +53 -0
- data/lib/bel_parser/language/version2_0/relationships/reactant_in.rb +60 -0
- data/lib/bel_parser/language/version2_0/relationships/regulates.rb +51 -0
- data/lib/bel_parser/language/version2_0/relationships/sub_process_of.rb +55 -0
- data/lib/bel_parser/language/version2_0/relationships/transcribed_to.rb +53 -0
- data/lib/bel_parser/language/version2_0/relationships/translated_to.rb +54 -0
- data/lib/bel_parser/language/version2_0/relationships/translocates.rb +57 -0
- data/lib/bel_parser/language/version2_0/return_types/abundance.rb +20 -0
- data/lib/bel_parser/language/version2_0/return_types/activity.rb +20 -0
- data/lib/bel_parser/language/version2_0/return_types/any.rb +74 -0
- data/lib/bel_parser/language/version2_0/return_types/biological_process.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/complex_abundance.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/fragment.rb +20 -0
- data/lib/bel_parser/language/version2_0/return_types/from_location.rb +20 -0
- data/lib/bel_parser/language/version2_0/return_types/fusion.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/gene_abundance.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/list.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/location.rb +20 -0
- data/lib/bel_parser/language/version2_0/return_types/micro_rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/molecular_activity.rb +20 -0
- data/lib/bel_parser/language/version2_0/return_types/pathology.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/products.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/protein_abundance.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/protein_modification.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/reactants.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/rna_abundance.rb +17 -0
- data/lib/bel_parser/language/version2_0/return_types/to_location.rb +20 -0
- data/lib/bel_parser/language/version2_0/return_types/variant.rb +20 -0
- data/lib/bel_parser/language/version2_0/value_encodings/abundance.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/activity.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/any.rb +74 -0
- data/lib/bel_parser/language/version2_0/value_encodings/biological_process.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/complex_abundance.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/gene_abundance.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/location.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/micro_rna_abundance.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/pathology.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/protein_abundance.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/protein_modification.rb +21 -0
- data/lib/bel_parser/language/version2_0/value_encodings/rna_abundance.rb +21 -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/parsers/ast/node.rb +987 -0
- data/lib/bel_parser/parsers/ast/sexp.rb +8 -0
- data/lib/bel_parser/parsers/bel_script.rb +5 -0
- data/lib/bel_parser/parsers/bel_script/define_annotation.rb +5920 -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 +5008 -0
- data/lib/bel_parser/parsers/bel_script/set.rl +116 -0
- data/lib/bel_parser/parsers/bel_script/set_document.rb +7722 -0
- data/lib/bel_parser/parsers/bel_script/set_document.rl +97 -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 +2388 -0
- data/lib/bel_parser/parsers/common/list.rl +146 -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/nested_statement.rb +17802 -0
- data/lib/bel_parser/parsers/expression/nested_statement.rl +141 -0
- data/lib/bel_parser/parsers/expression/observed_term.rb +7291 -0
- data/lib/bel_parser/parsers/expression/observed_term.rl +92 -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/simple_statement.rb +10475 -0
- data/lib/bel_parser/parsers/expression/simple_statement.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/parsers/serializer.rb +205 -0
- data/lib/bel_parser/quoting.rb +177 -0
- data/lib/bel_parser/resource/concept.rb +56 -0
- data/lib/bel_parser/resource/concept_scheme.rb +35 -0
- data/lib/bel_parser/resource/dataset.rb +34 -0
- data/lib/bel_parser/resource/eager_reader.rb +89 -0
- data/lib/bel_parser/resource/eager_sparql_reader.rb +51 -0
- data/lib/bel_parser/resource/file_resource.rb +21 -0
- data/lib/bel_parser/resource/file_resource_value.rb +24 -0
- data/lib/bel_parser/resource/jena_tdb_reader.rb +246 -0
- data/lib/bel_parser/resource/lru_cache.rb +111 -0
- data/lib/bel_parser/resource/lru_reader.rb +34 -0
- data/lib/bel_parser/resource/reader.rb +18 -0
- data/lib/bel_parser/resource/resource_url_reader.rb +181 -0
- data/lib/bel_parser/resource/sparql_reader.rb +179 -0
- data/lib/bel_parser/resource/value.rb +31 -0
- data/lib/bel_parser/script.rb +8 -0
- data/lib/bel_parser/script/filter.rb +35 -0
- data/lib/bel_parser/script/first_node.rb +21 -0
- data/lib/bel_parser/script/keywords.rb +32 -0
- data/lib/bel_parser/script/nanopub_mapper.rb +182 -0
- data/lib/bel_parser/script/parser.rb +51 -0
- data/lib/bel_parser/script/state/annotation_definition.rb +62 -0
- data/lib/bel_parser/script/state/bel_version.rb +36 -0
- data/lib/bel_parser/script/state/document_property.rb +29 -0
- data/lib/bel_parser/script/state/namespace_definition.rb +32 -0
- data/lib/bel_parser/script/state/set.rb +82 -0
- data/lib/bel_parser/script/state/unset.rb +46 -0
- data/lib/bel_parser/script/state_aggregator.rb +49 -0
- data/lib/bel_parser/script/state_function.rb +10 -0
- data/lib/bel_parser/script/syntax/expression_validation.rb +46 -0
- data/lib/bel_parser/script/syntax/invalid_regex_pattern.rb +49 -0
- data/lib/bel_parser/script/syntax/undefined_annotation.rb +61 -0
- data/lib/bel_parser/script/syntax/undefined_annotation_value.rb +84 -0
- data/lib/bel_parser/script/syntax/unresolvable_namespace.rb +54 -0
- data/lib/bel_parser/script/syntax/unsupported_bel_version.rb +59 -0
- data/lib/bel_parser/script/validator.rb +65 -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 +390 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../function'
|
3
|
+
require_relative '../../signature'
|
4
|
+
require_relative '../../semantics'
|
5
|
+
|
6
|
+
module BELParser
|
7
|
+
module Language
|
8
|
+
module Version1_0
|
9
|
+
module Functions
|
10
|
+
# Products: Denotes the products of a reaction
|
11
|
+
class Products
|
12
|
+
extend Function
|
13
|
+
|
14
|
+
SHORT = :products
|
15
|
+
LONG = :products
|
16
|
+
RETURN_TYPE = BELParser::Language::Version1_0::ReturnTypes::Products
|
17
|
+
DESCRIPTION = 'Denotes the products of a reaction'.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
|
+
# ProductsSignature
|
41
|
+
class ProductsSignature
|
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(Products))),
|
51
|
+
variadic_arguments(
|
52
|
+
term(
|
53
|
+
function(
|
54
|
+
identifier(
|
55
|
+
return_type_of(BELParser::Language::Version1_0::ReturnTypes::Abundance))))))
|
56
|
+
end
|
57
|
+
private_constant :AST
|
58
|
+
|
59
|
+
STRING_FORM = 'products(F:abundance...)products'.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
|
+
end
|
71
|
+
|
72
|
+
SIGNATURES = Signatures.constants.map do |const|
|
73
|
+
Signatures.const_get(const)
|
74
|
+
end.freeze
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,234 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../function'
|
3
|
+
require_relative '../../signature'
|
4
|
+
require_relative '../../semantics'
|
5
|
+
|
6
|
+
module BELParser
|
7
|
+
module Language
|
8
|
+
module Version1_0
|
9
|
+
module Functions
|
10
|
+
# ProteinAbundance: Denotes the abundance of a protein
|
11
|
+
class ProteinAbundance
|
12
|
+
extend Function
|
13
|
+
|
14
|
+
SHORT = :p
|
15
|
+
LONG = :proteinAbundance
|
16
|
+
RETURN_TYPE = BELParser::Language::Version1_0::ReturnTypes::ProteinAbundance
|
17
|
+
PROTEIN_ENC = BELParser::Language::Version1_0::ValueEncodings::ProteinAbundance
|
18
|
+
DESCRIPTION = 'Denotes the abundance of a protein'.freeze
|
19
|
+
|
20
|
+
def self.short
|
21
|
+
SHORT
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.long
|
25
|
+
LONG
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.return_type
|
29
|
+
RETURN_TYPE
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.description
|
33
|
+
DESCRIPTION
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.signatures
|
37
|
+
SIGNATURES
|
38
|
+
end
|
39
|
+
|
40
|
+
module Signatures
|
41
|
+
# ProteinAbundanceWithFusionSignature
|
42
|
+
class ProteinAbundanceWithFusionSignature
|
43
|
+
extend BELParser::Language::Signature
|
44
|
+
|
45
|
+
private_class_method :new
|
46
|
+
|
47
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
48
|
+
term(
|
49
|
+
function(
|
50
|
+
identifier(
|
51
|
+
function_of(ProteinAbundance))),
|
52
|
+
argument(
|
53
|
+
parameter(
|
54
|
+
prefix(
|
55
|
+
has_namespace),
|
56
|
+
value(
|
57
|
+
has_encoding,
|
58
|
+
encoding_of(PROTEIN_ENC)))),
|
59
|
+
argument(
|
60
|
+
term(
|
61
|
+
function(
|
62
|
+
identifier(
|
63
|
+
return_type_of(BELParser::Language::Version1_0::ReturnTypes::Fusion))))))
|
64
|
+
end
|
65
|
+
private_constant :AST
|
66
|
+
|
67
|
+
STRING_FORM = 'proteinAbundance(E:proteinAbundance,F:fusion)proteinAbundance'.freeze
|
68
|
+
private_constant :STRING_FORM
|
69
|
+
|
70
|
+
def self.semantic_ast
|
71
|
+
AST
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.string_form
|
75
|
+
STRING_FORM
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# ProteinAbundanceWithProteinModificationSignature
|
80
|
+
class ProteinAbundanceWithProteinModificationSignature
|
81
|
+
extend BELParser::Language::Signature
|
82
|
+
|
83
|
+
private_class_method :new
|
84
|
+
|
85
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
86
|
+
term(
|
87
|
+
function(
|
88
|
+
identifier(
|
89
|
+
function_of(ProteinAbundance))),
|
90
|
+
argument(
|
91
|
+
parameter(
|
92
|
+
prefix(
|
93
|
+
has_namespace),
|
94
|
+
value(
|
95
|
+
has_encoding,
|
96
|
+
encoding_of(PROTEIN_ENC)))),
|
97
|
+
argument(
|
98
|
+
term(
|
99
|
+
function(
|
100
|
+
identifier(
|
101
|
+
return_type_of(BELParser::Language::Version1_0::ReturnTypes::ProteinModification))))))
|
102
|
+
end
|
103
|
+
private_constant :AST
|
104
|
+
|
105
|
+
STRING_FORM = 'proteinAbundance(E:proteinAbundance,F:proteinModification)proteinAbundance'.freeze
|
106
|
+
private_constant :STRING_FORM
|
107
|
+
|
108
|
+
def self.semantic_ast
|
109
|
+
AST
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.string_form
|
113
|
+
STRING_FORM
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# ProteinAbundanceWithSubstitutionSignature
|
118
|
+
class ProteinAbundanceWithSubstitutionSignature
|
119
|
+
extend BELParser::Language::Signature
|
120
|
+
|
121
|
+
private_class_method :new
|
122
|
+
|
123
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
124
|
+
term(
|
125
|
+
function(
|
126
|
+
identifier(
|
127
|
+
function_of(ProteinAbundance))),
|
128
|
+
argument(
|
129
|
+
parameter(
|
130
|
+
prefix(
|
131
|
+
has_namespace),
|
132
|
+
value(
|
133
|
+
has_encoding,
|
134
|
+
encoding_of(PROTEIN_ENC)))),
|
135
|
+
argument(
|
136
|
+
term(
|
137
|
+
function(
|
138
|
+
identifier(
|
139
|
+
return_type_of(BELParser::Language::Version1_0::ReturnTypes::Substitution))))))
|
140
|
+
end
|
141
|
+
private_constant :AST
|
142
|
+
|
143
|
+
STRING_FORM = 'proteinAbundance(E:proteinAbundance,F:substitution)proteinAbundance'.freeze
|
144
|
+
private_constant :STRING_FORM
|
145
|
+
|
146
|
+
def self.semantic_ast
|
147
|
+
AST
|
148
|
+
end
|
149
|
+
|
150
|
+
def self.string_form
|
151
|
+
STRING_FORM
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# ProteinAbundanceWithTruncationSignature
|
156
|
+
class ProteinAbundanceWithTruncationSignature
|
157
|
+
extend BELParser::Language::Signature
|
158
|
+
|
159
|
+
private_class_method :new
|
160
|
+
|
161
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
162
|
+
term(
|
163
|
+
function(
|
164
|
+
identifier(
|
165
|
+
function_of(ProteinAbundance))),
|
166
|
+
argument(
|
167
|
+
parameter(
|
168
|
+
prefix(
|
169
|
+
has_namespace),
|
170
|
+
value(
|
171
|
+
has_encoding,
|
172
|
+
encoding_of(PROTEIN_ENC)))),
|
173
|
+
argument(
|
174
|
+
term(
|
175
|
+
function(
|
176
|
+
identifier(
|
177
|
+
return_type_of(BELParser::Language::Version1_0::ReturnTypes::Truncation))))))
|
178
|
+
end
|
179
|
+
private_constant :AST
|
180
|
+
|
181
|
+
STRING_FORM = 'proteinAbundance(E:proteinAbundance,F:truncation)proteinAbundance'.freeze
|
182
|
+
private_constant :STRING_FORM
|
183
|
+
|
184
|
+
def self.semantic_ast
|
185
|
+
AST
|
186
|
+
end
|
187
|
+
|
188
|
+
def self.string_form
|
189
|
+
STRING_FORM
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# ProteinAbundanceSignature
|
194
|
+
class ProteinAbundanceSignature
|
195
|
+
extend BELParser::Language::Signature
|
196
|
+
|
197
|
+
private_class_method :new
|
198
|
+
|
199
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
200
|
+
term(
|
201
|
+
function(
|
202
|
+
identifier(
|
203
|
+
function_of(ProteinAbundance))),
|
204
|
+
argument(
|
205
|
+
parameter(
|
206
|
+
prefix(
|
207
|
+
has_namespace),
|
208
|
+
value(
|
209
|
+
has_encoding,
|
210
|
+
encoding_of(PROTEIN_ENC)))))
|
211
|
+
end
|
212
|
+
private_constant :AST
|
213
|
+
|
214
|
+
STRING_FORM = 'proteinAbundance(E:proteinAbundance)proteinAbundance'.freeze
|
215
|
+
private_constant :STRING_FORM
|
216
|
+
|
217
|
+
def self.semantic_ast
|
218
|
+
AST
|
219
|
+
end
|
220
|
+
|
221
|
+
def self.string_form
|
222
|
+
STRING_FORM
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
SIGNATURES = Signatures.constants.map do |const|
|
228
|
+
Signatures.const_get(const)
|
229
|
+
end.freeze
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
@@ -0,0 +1,179 @@
|
|
1
|
+
require_relative '../../version1_0'
|
2
|
+
require_relative '../../function'
|
3
|
+
require_relative '../../signature'
|
4
|
+
require_relative '../../amino_acid'
|
5
|
+
require_relative '../../covalent_protein_modification'
|
6
|
+
require_relative '../../semantics'
|
7
|
+
|
8
|
+
module BELParser
|
9
|
+
module Language
|
10
|
+
module Version1_0
|
11
|
+
module Functions
|
12
|
+
# ProteinModification: Denotes a covalently modified protein
|
13
|
+
# abundance
|
14
|
+
class ProteinModification
|
15
|
+
extend Function
|
16
|
+
|
17
|
+
SHORT = :pmod
|
18
|
+
LONG = :proteinModification
|
19
|
+
RETURN_TYPE = BELParser::Language::Version1_0::ReturnTypes::
|
20
|
+
ProteinModification
|
21
|
+
DESCRIPTION = 'Denotes a covalently modified protein
|
22
|
+
bundance'.freeze
|
23
|
+
|
24
|
+
def self.short
|
25
|
+
SHORT
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.long
|
29
|
+
LONG
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.return_type
|
33
|
+
RETURN_TYPE
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.description
|
37
|
+
DESCRIPTION
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.signatures
|
41
|
+
SIGNATURES
|
42
|
+
end
|
43
|
+
|
44
|
+
module Signatures
|
45
|
+
# ProteinModificationWithCovalentAminoPositionSignature
|
46
|
+
class ProteinModificationWithCovalentAminoPositionSignature
|
47
|
+
extend BELParser::Language::Signature
|
48
|
+
|
49
|
+
private_class_method :new
|
50
|
+
|
51
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
52
|
+
term(
|
53
|
+
function(
|
54
|
+
identifier(
|
55
|
+
function_of(ProteinModification))),
|
56
|
+
argument(
|
57
|
+
parameter(
|
58
|
+
prefix(any),
|
59
|
+
value(
|
60
|
+
covalent_protein_modification_of(
|
61
|
+
*CovalentProteinModification.values)))),
|
62
|
+
argument(
|
63
|
+
parameter(
|
64
|
+
prefix(any),
|
65
|
+
value(
|
66
|
+
amino_acid_of(*AminoAcid.values)))),
|
67
|
+
argument(
|
68
|
+
parameter(
|
69
|
+
prefix(any),
|
70
|
+
value(
|
71
|
+
is_sequence_position))))
|
72
|
+
end
|
73
|
+
private_constant :AST
|
74
|
+
|
75
|
+
STRING_FORM =
|
76
|
+
<<-SIG.delete("\s\n").freeze
|
77
|
+
proteinModification(
|
78
|
+
T:CovalentProteinModification,
|
79
|
+
T:AminoAcid,
|
80
|
+
T:SequencePosition)proteinModification
|
81
|
+
SIG
|
82
|
+
private_constant :STRING_FORM
|
83
|
+
|
84
|
+
def self.semantic_ast
|
85
|
+
AST
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.string_form
|
89
|
+
STRING_FORM
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# ProteinModificationWithCovalentAminoSignature
|
94
|
+
class ProteinModificationWithCovalentAminoSignature
|
95
|
+
extend BELParser::Language::Signature
|
96
|
+
|
97
|
+
private_class_method :new
|
98
|
+
|
99
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
100
|
+
term(
|
101
|
+
function(
|
102
|
+
identifier(
|
103
|
+
function_of(ProteinModification))),
|
104
|
+
argument(
|
105
|
+
parameter(
|
106
|
+
prefix(any),
|
107
|
+
value(
|
108
|
+
covalent_protein_modification_of(
|
109
|
+
*CovalentProteinModification.values)))),
|
110
|
+
argument(
|
111
|
+
parameter(
|
112
|
+
prefix(any),
|
113
|
+
value(
|
114
|
+
amino_acid_of(*AminoAcid.values)))))
|
115
|
+
end
|
116
|
+
private_constant :AST
|
117
|
+
|
118
|
+
STRING_FORM =
|
119
|
+
<<-SIG.delete("\s\n").freeze
|
120
|
+
proteinModification(
|
121
|
+
T:CovalentProteinModification,
|
122
|
+
T:AminoAcid)proteinModification
|
123
|
+
SIG
|
124
|
+
private_constant :STRING_FORM
|
125
|
+
|
126
|
+
def self.semantic_ast
|
127
|
+
AST
|
128
|
+
end
|
129
|
+
|
130
|
+
def self.string_form
|
131
|
+
STRING_FORM
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# ProteinModificationWithCovalentSignature
|
136
|
+
class ProteinModificationWithCovalentSignature
|
137
|
+
extend BELParser::Language::Signature
|
138
|
+
|
139
|
+
private_class_method :new
|
140
|
+
|
141
|
+
AST = BELParser::Language::Semantics::Builder.build do
|
142
|
+
term(
|
143
|
+
function(
|
144
|
+
identifier(
|
145
|
+
function_of(ProteinModification))),
|
146
|
+
argument(
|
147
|
+
parameter(
|
148
|
+
prefix(any),
|
149
|
+
value(
|
150
|
+
covalent_protein_modification_of(
|
151
|
+
*CovalentProteinModification.values)))))
|
152
|
+
end
|
153
|
+
private_constant :AST
|
154
|
+
|
155
|
+
STRING_FORM =
|
156
|
+
<<-SIG.delete("\s\n").freeze
|
157
|
+
proteinModification(
|
158
|
+
T:CovalentProteinModification)proteinModification
|
159
|
+
SIG
|
160
|
+
private_constant :STRING_FORM
|
161
|
+
|
162
|
+
def self.semantic_ast
|
163
|
+
AST
|
164
|
+
end
|
165
|
+
|
166
|
+
def self.string_form
|
167
|
+
STRING_FORM
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
SIGNATURES = Signatures.constants.map do |const|
|
173
|
+
Signatures.const_get(const)
|
174
|
+
end.freeze
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|