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.dev0.tar.gz
(27.5 kB
view hashes)
Built Distribution
Close
Hashes for loinchpo-1.1.2.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a533f409e1ec24d2cd1992fee9136606fc65e47ea1ba1636b4300a033466f09a |
|
MD5 | 71a3ee1eb909c2246e4d207cbfa8ede3 |
|
BLAKE2b-256 | cfb39b5d8099cefca201a4c1f121f48e4c9382942e45f1db8294334100cfb42b |