Ontologies help research scientists in many specialties reconcile data with common and controlled vocabularies. Aligning terms, hierarchies, and the meaning of specific data columns and values is important for consistent analysis, reporting, and cross-organization integration. An ontology system will standardize concepts
, understand their hierarchies
, and align synonyms
which describe the same entities. You can think of an ontology like a language; when your data is all speaking the same language, greater meaning emerges.
module enables reporting and using controlled vocabularies
. Many such vocabularies are in active use in different research communities. Some examples:
- NCIT (NCI Thesaurus): A reference terminology and biomedical ontology
- LOINC (Logical Observation Identifiers Names and Codes): Codes for each test, measurement, or observation that has a clinically different meaning
- SNOMED_CT (Systemized Nomenclature of Medicine - Clinical Terms): A standardized multilingual vocabulary of clinical terminology used for electronic exchange of health information
- MSH (Medical Subject Headings): Used for indexing, cataloging, and searching for health related information
- Find more examples in the National Library of Medicine metathesaurus
Generate Ontology Archive
The first step is to generate an ontology archive that can be loaded into LabKey. A set of python scripts is provided on GitHub to help you accomplish this.
The python script is designed to accept OWL, NCI, and GO files, but support is not universal for all files of these types. Contact your Account Manager to get started and for help with individual files.
Once generated, the archive will contain individual text files:
- concepts.txt: (Required) The preferred terms and their codes for this ontology. The standard vocabulary.
- hierarchy.txt: (Recommended) The hierarchy among these standard terms, expressed in levels and paths to the codes. This can be used to group related items.
- synonyms.txt: An expected set of local or reported terms that might be used in addition to the preferred term, mapping them to the code so that they are treated as the same concept.
Load and Use Ontologies
To learn about loading ontologies onto your LabKey Server and enabling their use in folders, see this topic: Load Ontologies
Once an ontology has been loaded and the module enabled in your folder, the field editor
will include new options and you can use ontology information in your SQL queries.
Concept annotations let you link columns in your data to concepts in your ontology. The field editor
will include an option to associate the column with a specific concept. For example, a "medication" column might map to a "NCIT:ST1000016" concept code used in a centralized invoicing system.
Learn more in this topic: Concept Annotations
Ontology Lookup Fields
The field editor
also includes an Ontology Lookup
data type. This field type encompasses three related fields, helping you take an input value and look up both the preferred term and the code used in the ontology.
Learn more in this topic: Ontology Lookup
Ontologies in SQL
New LabKey SQL syntax allows you to incorporate ontology hierarchy and synonyms into your queries.
Learn more in this topic: Ontology SQL