Python version of LOINC2HPO
Project description
loinchpo
A simple and efficient library for mapping loinc test results to hpo terms.
Requirements
Python 3.5+
Installing with pip
pip install loinchpo
Installing with Conda
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install loinchpo
Usage
Just three steps and you should be able to map your loinc codes to hpo.
1. Parse the annotations using AnnotationParser
A dictionary from file:
annotations = AnnotationParser.parse_annotation_file(annotation_path)
A list from file:
annotations = AnnotationParser.parse_annotation_file(annotation_path, ls=True)
A dictionary from pandas df:
annotations = AnnotationParser.parse_annotation(dataframe)
2. Parse the query files
File path returns a list of queries:
queries = QueryFileParser.parse(query_path)
Single query:
query = Query(loinc_id, outcome)
3. Resolve the hpo term
resolver = QueryResolver(annotations)
hpo_term = resolver.resolve(query)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
loinchpo-1.1.2.dev1.tar.gz
(23.1 kB
view hashes)
Built Distribution
Close
Hashes for loinchpo-1.1.2.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c5b5b4577114ea64501d68feb25107742a3ff3b92be6221661334643602ce0 |
|
MD5 | fd59513d777d7f181f2529a72dc4098e |
|
BLAKE2b-256 | 6047f875a8146f5ef97afb81a5319b830641ccb19e868c182828163c00856410 |