This repository was archived by the owner on Sep 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
BEL Specifications
Tony Bargnesi edited this page Mar 9, 2017
·
10 revisions
BEL specifications are defined within the bel_parser gem. The components of the specifications were designed to be separate from its application (e.g. semantic analysis, autocomplete, etc) to maximize reuse.
Currently BEL 1.0 and 2.0 are implemented separately within the gem.
BEL specifications comprise:
- Functions
- Indicates the types one ore more biological entities. A Function plus its Arguments comprise a Term.
- Example:
proteinAbundance,biologicalProcess, ... - See BEL Terms as Functional Expressions
- BEL 2.0 functions: bel_parser/language/version2_0/functions/
- Return Types
- Functions return a Return Type to allow composition. Return types are hierarchical.
- Example:
tloc(p(HGNC:CDKN1A), fromLoc(MESHCS:"Cell Nucleus"), toLoc(MESHCS:Cytoplasm));translocationaccepts an Abundance in the first position andp(HGNC:CDKN1A)returns a ProteinAbundance which is a sub-type of Abundance. - BEL 2.0 return types: bel_parser/language/version2_0/return_types/
- Value Encodings
- A biological identifier is given one or more types to specify what it codes for. Value encodings are hierarchical.
- Example:
AKT1as defined by HGNC can code for a Gene, Protein, or RNA, which we specify as value encodings. - BEL 2.0 value encodings: bel_parser/language/version2_0/value_encodings/
- Relationships
- The observed interaction between a subject and object in a BEL expression. The most used relationship classes are either causal or correlative.
- Example:
directlyIncreasesrepresents a direct, physical interaction where increase in the amount of a subject causes an increase in the amount of an object - BEL 2.0 relationships: bel_parser/language/version2_0/relationships/
- Upgrades
- Mechanisms for upgrading BEL expressions from one specification version to another.
- Example: Converting BEL 1.0
kin(HGNC:AKT1)to BEL 2.0act(p(HGNC:AKT1), ma(DEFAULT:kin)) - BEL 1.0 upgrades: bel_parser/language/version1_0/upgrades/
These components are loaded automatically by BaseSpecification. You just have describe the specification and which path to load the components from.
# Loads components within version2_0/.
# Describe the version (major.minor) and URI.
module BELParser
module Language
module Version2_0
# Version2_0 specification defines the BEL 2.0 specification.
class Specification < BaseSpecification
BaseSpecification.load_version_path('version2_0')
def initialize
@version = '2.0'.freeze
@uri = 'http://www.openbel.org/2.0'
load_language_constants(Version2_0)
freeze
end
end
end
end
endBEL specifications can be loaded in one simple call.
BELParser::Language.specification('2.0')
# [7] pry(main)> ls -m BELParser::Language.specification('2.0')
# BELParser::Language::Specification#methods:
# causal_relationships deprecated_relationships freeze_categories genomic_relationships inspect relationships self_relationships value_encoding
# correlative_relationships direct_relationships function increasing_relationships listable_relationships return_type upgrades version
# decreasing_relationships directed_relationships functions indirect_relationships relationship return_types uri