Importing UMLS To Virtual Appliance

From NCBO Wiki
Revision as of 12:05, 5 March 2014 by Palexand (talk | contribs) (Created page with "Category:NCBO Virtual Appliance <p>The NCBO Virtual Appliance supports [ OBO] and [ O...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The NCBO Virtual Appliance supports OBO and OWL ontology formats but not UMLS in its native form. To bridge this gap, we have developed a project called UMLS2RDF that transforms UMLS ontologies into OWL/RDF.

UMLS2RDF is a Python script that connects to a UMLS MySQL installation and extracts the UMLS ontologies in a format that the Appliance can work with.

Install UMLS MySQL

To import UMLS ontologies, a local installation of the UMLS MySQL release needs to be available. Please refer to the UMLS documentation for instructions on how to install the UMLS MySQL distribution.

Install UMLS2RDF

  1. First clone the github project:
    git clone
  2. Install the MySQL Python driver. We recommend to use pip for this:
    pip install MySQL-python

Configure UMLS2RDF

UMLS2RDF has two configuration files:

  1. where the database configuration (host,name,user and password) needs to be specified. Also the output folder.
  2. umls.conf where one can specified the UMLS ontologies to be extracted. This is a comma separated file with the following 4 fields:
    1. SAB
    2. This is legacy. Any value works.
    3. Output file name.
    4. Conversion strategy. Accepted values (load_on_codes, load_on_cuis).

With load_on_codes the original source of the ontology will be used as strategy. The Class IDs will be constructed with the MRCONSO.CODE field. If load_on_cuis is selected then the strategy to transform the ontology will use CUIs to construct the Class IDs.

In our configuration file, you can see the settings used by our production system. These are all the UMLS ontologies that are publicly available in BioPortal.


Once the configuration files have the settings run the command:


Depending on how many ontologies are extracted the run time can range from a few minutes to four hours. This process is memory intensive and to transform the largest UMLS ontologies (i.e: SNOMED) one needs at least 16G RAM available.

Upload files to the NCBO Virtual Appliance

The output files will be located in the folder specified in Use the BioPortal Web form available in your appliance to submit the extracted ontologies. IMPORTANT: The ontology format in the submission form should be UMLS.

Hardware Considerations

NCBO dedicates a fair amount of resources (powerful servers) to handle a good portion of UMLS ontologies. Some of the UMLS ontologies contain millions of classes. To import the largest UMLS ontologies (i.e: RXNORM or SNOMEDCT) Users will have to run the Appliance in a powerful dedicated environment with 8GB RAM and 5GB hard disk space available.