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.dev2.tar.gz
(37.6 kB
view hashes)
Built Distribution
Close
Hashes for loinchpo-1.1.2.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 942d9aa544cb8d16a56703b9def9125f05aca0ddd9b55fc8504d3ac1481028bd |
|
MD5 | 2d2db3453d3631570530d9aa3455c1a3 |
|
BLAKE2b-256 | 6e50e4578b967e523517085e9aef2f02dc8857e80748cbd8f97a5af5331a1d12 |