Georgetown-IR-Lab / QuickUMLS

System for Medical Concept Extraction and Linking
MIT License
369 stars 95 forks source link

[BUG] QuickUMLS install fails #96

Closed rmalla1 closed 5 months ago

rmalla1 commented 5 months ago

Describe the bug QuickUMLS install fails with a KeyError, 'C0000120'. The Key exists in the mrconso file.

To Reproduce

  1. Download UMLS library.
  2. Run, python -m quickumls.install ~/grizzly/umls/data/2023AB/META .
  3. The install fails with the following stack trace:

Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/ubuntu/grizzly/venv3/lib/python3.10/site-packages/quickumls/install.py", line 233, in main() File "/home/ubuntu/grizzly/venv3/lib/python3.10/site-packages/quickumls/install.py", line 228, in main parse_and_encode_ngrams(mrconso_iterator, simstring_dir, cuisty_dir, File "/home/ubuntu/grizzly/venv3/lib/python3.10/site-packages/quickumls/install.py", line 115, in parse_and_encode_ngrams for i, (term, cui, stys, preferred) in enumerate(extracted_it, start=1): File "/home/ubuntu/grizzly/venv3/lib/python3.10/site-packages/quickumls/install.py", line 95, in extract_from_mrconso yield (concept_text, cui, sem_types[cui], preferred) KeyError: 'C0000120'

Environment

Additional context Add any other context about the problem here.

rmalla1 commented 5 months ago

NVM. This occurs if you do not have full UMLS package installed. Initially I had only mrconso and mrsty files. Apparently, the installer needs other files too.