Ontologies Parsers¶
icdParser.py¶
-
parser
(ICDfile)[source]¶ Parses and extracts relevant data from ICD-10 files (Classification of Diseases).
- Parameters
ICDfile – list of files downloaded from the ontology database and used to generate nodes and relationships to the graph database.
- Returns
Three nested dictionaries: terms, relationships between terms, and definitions of the terms.
terms: Dictionary where each key is an ontology identifier (str) and the values are lists of names and synonyms (list[str]).
relationships: Dictionary of tuples (str). Each tuple contains two ontology identifiers (source and target) and the relationship type between them.
definitions: Dictionary with ontology identifiers as keys (str), and definition of the terms as values (str).
oboParser.py¶
-
parser
(ontology, files)[source]¶ Multiple ontology database parser. This function parses and extracts relevant data from: Disease Ontology, Tissues, Human Phenotype Ontology, HUPO-PSI and Gene Ontology databases.
- Parameters
- Returns
Three nested dictionaries: terms, relationships between terms, and definitions of the terms.
terms: Dictionary where each key is an ontology identifier (str) and the values are lists of names and synonyms (list[str]).
relationships: Dictionary of tuples (str). Each tuple contains two ontology identifiers (source and target) and the relationship type between them.
definitions: Dictionary with ontology identifiers as keys (str), and definition of the terms as values (str).
reflectParser.py¶
-
parser
(files, filters, qtype=None)[source]¶ Parses and extracts relevant data from REFLECT ontologies: Disease Ontology, Tissues, STITCH and Gene Ontology databases.
- Parameters
- Returns
Three nested dictionaries: terms, relationships between terms, and definitions of the terms.
terms: Dictionary where each key is an ontology dentifier (str) and the values are lists of names and synonyms (list[str]).
relationships: Dictionary of tuples (str). Each tuple contains two ontology identifiers (source and target) and the relationship type between them.
definitions: Dictionary with ontology dentifiers as keys (str), and definition of the terms as values (str).
snomedParser.py¶
-
parser
(files, filters)[source]¶ Parses and extracts relevant data from SNOMED CT database files.
- Parameters
- Returns
Three nested dictionaries: terms, relationships between terms, and definitions of the terms.
terms: Dictionary where each key is a SNOMED CT Identifier (str) and the values are lists of names and synonyms (list[str]).
relationships: Dictionary of tuples (str). Each tuple contains two SNOMED CT Identifiers (source and target) and the relationship type between them.
definitions: Dictionary with SNOMED CT Identifiers as keys (str), and definition of the terms as values (str).