Skip to content
/ LexMapr Public

LexMapr: A Lexicon and Rule-Based Tool for Translating Short Biomedical Specimen Descriptions into Semantic Web Ontology Terms

License

Notifications You must be signed in to change notification settings

cidgoh/LexMapr

Repository files navigation

LexMapr

A Lexicon and Rule-Based Tool for Translating Short Biomedical Specimen Descriptions into Semantic Web Ontology Terms

Build Status Coverage Status bioconda-badge

alt text

Installation

With Bioconda

Set up Bioconda, if you haven't already!

Then:

$ conda create -n LexMapr lexmapr python=3.11
$ conda activate LexMapr
$ python -m nltk.downloader all

Without Bioconda

Install Conda.

Create a LexMapr environment:

$ conda create --name LexMapr python=3.11

(Python 3.11+ at moment doesn't work due to some core module changes).

Install LexMapr into your conda environment:

$ conda activate LexMapr
$ git clone https://github.com/cidgoh/LexMapr.git
$ cd LexMapr
$ pip install .
$ python -m nltk.downloader all

Usage

Files

small_simple.csv

SampleId,Sample
small_simple1,Chicken Breast
small_simple2,Baked Potato
small_simple3,Canned Corn
small_simple4,Frozen Yogurt
small_simple5,Apple Pie

small_simple_config.json

[
  {"http://purl.obolibrary.org/obo/foodon.owl": "http://purl.obolibrary.org/obo/BFO_0000040"},
  {"http://purl.obolibrary.org/obo/foodon.owl": "http://purl.obolibrary.org/obo/BFO_0000015"}
]

Command line

(LexMapr) foo@bar:~$ lexmapr small_simple.csv -c small_simple_config.json
Sample_Id       Sample_Desc     Cleaned_Sample  Matched_Components
small_simple1   Chicken Breast  chicken breast  ['chicken breast:foodon_00002703']
small_simple2   Baked Potato    baked potato    ['potato (whole, baked):foodon_03302196']
small_simple3   Canned Corn     canned corn     ['corn (canned):foodon_03302665']
small_simple4   Frozen Yogurt   frozen yogurt   ['frozen yogurt:foodon_03307445']
small_simple5   Apple Pie       apple pie       ['apple pie:foodon_00002475']

More Documentation

Formal documentation

Tutorial slides for users with little or no experience with command line

Tutorial slides for IFSAC users with little or no experience with command line

About

LexMapr: A Lexicon and Rule-Based Tool for Translating Short Biomedical Specimen Descriptions into Semantic Web Ontology Terms

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages