Skip to content

Latest commit

 

History

History
86 lines (62 loc) · 2.59 KB

README.md

File metadata and controls

86 lines (62 loc) · 2.59 KB

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