These python scripts connect to the Unified Medical Language System (UMLS) database and translate the ontologies into RDF/OWL files. This is part of the BioPortal project.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
output
.gitignore new ignore settings Aug 28, 2013
.project
.pydevproject Add eclipe project files. Mar 27, 2013
COPYING
README.md Windows 10 tips Aug 4, 2018
checkOutputSyntax.sh
conf_sample.py
move_rdf_to_repo.py
umls.conf
umls2rdf.py

README.md

This project takes a MySQL Unified Medical Language System (UMLS) database and converts the ontologies to RDF using OWL and SKOS as the main schemas.

To use it:

  • Specify your database connection conf.py
  • Specify the SAB ontologies to export in umls.conf

The umls.conf configuration file must contain one ontology per line. The lines are comma separated tuples where the elements are:

(0) SAB
(1) BioPortal Virtual ID. This is optional, any value works.
(2) Output file name
(3) Conversion strategy. Accepted values (load_on_codes, load_on_cuis).

Note that 'CCS COSTAR DSM3R DSM4 DXP ICPC2ICD10ENG MCM MMSL MMX MTHCMSFRF MTHMST MTHSPL MTH NDFRT SNM' have no code and should not be loaded on loads_on_codes.

umls2rdf.py is designed to be an offline, run-once process. It's memory intensive and exports all of the default ontologies in umls.conf in 3h 30min. The ontologies listed in umls.conf are the UMLS ontologies accessible in BioPortal.

If running a Windows 10 OS with MySQL, the following tips may be of help.

  • Install MySQL 5.5 to avoid the InnoDB space disclaimer by NLM.
  • Python 2.7.x should be used to avoid syntax errors on 'raise Attribute'
  • For installtion of the MySQLdb module
    python -m pip install MySQLdb
    is error prone. Install with executable MySQL-python-1.2.3.win-amd64-py2.7 (last known location).
  • Create your RRF subset(s) using mmsys with the MySQL load option, load your database, edit conf.py and umls.py to specifications, run umsl2rdf.py