Skip to end of metadata
Go to start of metadata

Language Characteristics

This page provides information about other characteristics of the BEL Script format.

Reserved Keywords

The following keywords are reserved for use in BEL Script documents:

















Case Sensitivity

BEL and BEL Script are case sensitive. All relationship types, function names, and reserved keywords are case sensitive.

Annotation Type names and annotation values are case specific.

Namespace identifiers are case specific. The case sensitivity of namespace values is defined within the Namespace itself but most Namespaces default to being case sensitive.

Blank Lines

BEL Script allows blank lines in any section. Blank lines are ignored by the BEL Script processor.


All URLs used in Annotation Types or Namespace definitions in the Definitions section need to be quoted with double quotes.

Any string identifiers that contain non-alphanumeric characters including white space should be quoted. For example, the following BEL Statement

p(CHEBI:"4-fluoro-N-{2-[4-(7-methoxynaphthalen-1-yl)piperazin-1-yl]ethyl}benzamide(1+)") -> bp(GO:"cell proliferation")

would be correctly interpreted.

Escape Sequences in Quotes

Some characters must be escaped (using an escape sequence) for it to be recognized in a quoted string.  The following escape sequences are supported:

NameEscape SequenceDescription
Backslash\\Include an actual backslash character in the string.
Backspace control character\bCaptures a backspace control character (less used).
Tab\tCaptures a tab character.

Captures a newline character.

Form feed\fCaptures a form feed character.
Carriage return\rCaptures a carriage return character.
Double quote\"Captures a double quote character.
Single quote\'Captures a single quote character.
Unicode\uXXXX (X = hexidecimal 0 - F)

Captures a unicode character.  For example \u2026 represents the horizontal ellipsis (



\OOO, \OO, or \O

(O = octal 0 - 7)

Captures a character by its octal value.

Object Identifiers

Annotation Type and Namespace identifiers must contain only alphanumeric characters and underscore (_). They must not begin with number. By convention BEL Script uses Camel Case for object identifiers.

Examples of Valid Object Identifiers:

  • Quality
  • ExperimentType
  • experiment_type
  • Rating
  • Workflow
  • ReviewStatus

Examples of Invalid Object Identifiers:

  • Experiment type (space is not allowed)
  • 2nd_time_point (begins with a number)

List Operator

Certain control records take a list of arguments as input. A list is defined by enclosing comma separated values in { and } braces.

The following are examples of using the list operator:

SET BodyPart = {"lung", "liver"}
SET Citation = {"document type", "document name", "publication id"}

A List can be nested within another list if the operation takes a list of lists as values.

Line Continuation Operator

Statements in a BEL Script are processed one line at a time. Multiple lines can be grouped together by using the line continuation operator \. In this case, the lines are processed as a single statement. For example, the following two statements have the same meaning:

Statement 1:

kinase(p(HGNC:IGFI1R)) -| (p(HGNC:BNIP3) -> bp(GO:apoptosis))

Statement 2:

kinase(p(HGNC:IGFI1R)) -| \
 (p(HGNC:BNIP3) -> bp(GO:apoptosis))


BEL Script supports both Document-level and Statement-level comments in a script file.

Document Comments

Document-level comments can be positioned anywhere in a document. These comments do not get processed and are not stored once the BEL Script is imported into a Document Store. A document-level comment starts with a pound sign (#) character that must be the first character in the record.

The following are examples for document-level comments:

# document generated by NLP algorithm ABC on December 22, 2010
# most statements in this document are from a PubMed document

Statement Comments

BEL Script supports in-line comments associated with BEL Statements. In-line comments can be used after any BEL Statement. Each Statement comment starts with a double slash // followed by the comment text. All text following the comment is processed by the interpreter and will be imported into a BEL Document Store and associated with the BEL Statement.

The following is an example of a Statement-level comment:

tscript(p(HGNC:TP53)) -> r(HGNC:FAS) // apoptosis related gene 
  • No labels