Models¶
This module contains the SQLAlchemy database models that support the definition cache and graph cache.
- class pybel.manager.models.Base(**kwargs)¶
The most base type
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- class pybel.manager.models.Namespace(**kwargs)[source]¶
Represents a BEL Namespace.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- uploaded¶
The date of upload
- keyword¶
Keyword that is used in a BEL file to identify a specific namespace
- pattern¶
Contains regex pattern for value identification.
- miriam_id¶
MIRIAM resource identifier matching the regular expression
^MIR:001\d{5}$
- version¶
Version of the namespace
- url¶
BELNS Resource location as URL
- name¶
Name of the given namespace
- domain¶
Domain for which this namespace is valid
- species¶
Taxonomy identifiers for which this namespace is valid
- description¶
Optional short description of the namespace
- created¶
DateTime of the creation of the namespace definition file
- query_url¶
URL that can be used to query the namespace (externally from PyBEL)
- author¶
The author of the namespace
- license¶
License information
- contact¶
Contact information
- class pybel.manager.models.NamespaceEntry(**kwargs)[source]¶
Represents a name within a BEL namespace.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- name¶
Name that is defined in the corresponding namespace definition file
- identifier¶
The database accession number
- encoding¶
The biological entity types for which this name is valid
- class pybel.manager.models.Network(**kwargs)[source]¶
Represents a collection of edges, specified by a BEL Script.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- name¶
Name of the given Network (from the BEL file)
- version¶
Release version of the given Network (from the BEL file)
- authors¶
Authors of the underlying BEL file
- contact¶
Contact email from the underlying BEL file
- description¶
Descriptive text from the underlying BEL file
- copyright¶
Copyright information
- disclaimer¶
Disclaimer information
- licenses¶
License information
- blob¶
A pickled version of this network
- classmethod name_contains(name_query)[source]¶
Build a filter for networks whose names contain the query.
- classmethod description_contains(description_query)[source]¶
Build a filter for networks whose descriptions contain the query.
- class pybel.manager.models.Node(**kwargs)[source]¶
Represents a BEL Term.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- type¶
The type of the represented biological entity e.g. Protein or Gene
- bel¶
Canonical BEL term that represents the given node
- data¶
PyBEL BaseEntity as JSON
- class pybel.manager.models.Author(**kwargs)[source]¶
Contains all author names.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- class pybel.manager.models.Citation(**kwargs)[source]¶
The information about the citations that are used to prove a specific relation are stored in this table.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- db¶
Type of the stored publication e.g. PubMed
- db_id¶
Reference identifier of the publication e.g. PubMed_ID
- article_type¶
Type of the publication
- title¶
Title of the publication
- journal¶
Journal name
- volume¶
Volume of the journal
- issue¶
Issue within the volume
- pages¶
Pages of the publication
- date¶
Publication date
- first_id¶
First author
- last_id¶
Last author
- property is_enriched: bool¶
Return if this citation has been enriched for name, title, and other metadata.
- Return type
- class pybel.manager.models.Evidence(**kwargs)[source]¶
This table contains the evidence text that proves a specific relationship and refers the source that is cited.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- text¶
Supporting text from a given publication
- class pybel.manager.models.Edge(**kwargs)[source]¶
Relationships between BEL nodes and their properties, annotations, and provenance.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- bel¶
Valid BEL statement that represents the given edge
- source_modifier¶
Modifiers for the source of the edge
- target_modifier¶
Modifiers for the target of the edge
- md5¶
The hash of the source, target, and associated metadata
- data¶
The stringified JSON representing this edge