Giter Site home page Giter Site logo

comp-loinc's Introduction

CompLOINC LinkML

Computable OWL Formalization of LOINC

Website

Repository Structure

Developer Documentation

Use the `make` command to generate project artefacts:
  • make all: make everything
  • make deploy: deploys site

Credits

This project was made with linkml-project-cookiecutter.

Prerequisities

  1. Python 3.9.7+
  2. Required LOINC Files For now, these files are downloadable from GoogleDrive. They need to be put in these locations:
  • data/part_files/ComponentTree.tsv
  • data/code_files/LOINC.csv
  • data/code_files/LoincPartlink_Primary.csv

Setup

  1. Clone this repository.
  2. install poetry
  3. run poetry install

Usage

Commands 1.1 - 1.5 are meant to be run sequentially.

Alternatively, you can run all of them at once using default values by running python src/comp_loinc/cli/main.py all.

Help text can be run via python src/comp_loinc/cli/main.py --help. You can see help text for a specific command, including information about its parameters, by running python src/comp_loinc/cli/main.py COMMAND_NAME --help.

1.0. loinc_release: Download the latest LOINC release files and put them in the correct locations. Zip LoincRelease needs to be in the data/loinc_release directory.

python src/comp_loinc/main.py loinc_release

1.1. parts: Build the part ontology from the intermediate Part Hierarchy files

python src/comp_loinc/main.py parts --schema-file src/comp_loinc/schema/part_schema.yaml --part-directory data/part_files --output data/output/owl_component_files/part_ontology.owl

1.2. codes: Build the code classes from the intermediate Part Hierarchy files

python src/comp_loinc/main.py codes --schema-file src/comp_loinc/schema/code_schema.yaml --code-directory data/code_files --output data/output/owl_component_files/code_classes.owl

1.3. composed: Build the composed class axioms for the reasoner to group classes (this is pretty bespoke, and hardcoded at the moment)

python src/comp_loinc/main.py composed --schema-file src/comp_loinc/schema/grouping_classes_schema.yaml --composed-classes-data-file data/composed_classes_data.yaml --output data/output/owl_component_files/composed_component_classes.owl

1.4. map: Get Mappings from the LOINC FHIR Server and use SSSOM to convert to OWL (Requires LOINC FHIR Server credentials)

python src/comp_loinc/main.py map --username username --password password --output loinc2chebi.owl

1.5. merge: Merge all owl files into single merged ontology

python src/comp_loinc/main.py merge --owl-directory data/output/owl_component_files/ --output data/output/merged_loinc.owl

1.6. reason: Run the reasoner using elk to create the composed code classes

python src/comp_loinc/main.py reason --output latest/comp_loinc.owl

2. Open the merged and reasoned owl file in Protégé for viewing

Open data/output/merged_reasoned_loinc.owl

comp-loinc's People

Contributors

dmbaorto avatar joeflack4 avatar johnlhook avatar putmantime avatar timbrisc avatar victoriasoesanto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.