HIUTILS
A collection of utilities for health informatics
This is pre-alpha, anything might change, i.e. not ready for production use.
Application areas
Text annotation / NLP
Ontologies
Knowledge graphs
Statistics / summary data
Installation
pip install hiutils
Annotations
Overview
We assume that annotations are in the format:
{
document_id: {
entities: {
entitiy_id: {
...properties...,
cui : "concept_id",
meta_anns: {
'meta_ann_name': {'value': 'meta_ann_value',
'confidence': confidence,
'name': 'meta_ann_name'},
...other meta...
}
}
}
}
}
Basic process
The aim is to:
- keep only some annotations based on context
- convert from document->concepts to patient->concepts
- limit to a subset of concepts relevant to our project
- group some specific concepts into more general concepts e.g. specific subtypes of a disease -> any occurence of a that disease
To achieve these aims:
- 1 filter by meta_anns:
filtered = hi.annotations.filter_anns_meta(anns, {'Subject': ['Other']}, inplace=False)
- 2 aggregate to patient level
agg = hi.annotations.aggregate_docs(filtered, item2doc=pt2doc)
- 3+4 group relevant concepts and drop other concepts
groups = {'Group 1': set(['286933003', '70582006']), 'My other group': set(['60046008'])}
merged = hi.merge_concepts(agg, groups, keep_empty=False)
Metadata
Release files for hiutils 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hiutils-0.2.2.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hiutils-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.2 kB
Release files / hiutils-0.2.2.tar.gz
| Download URL | hiutils-0.2.2.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e39e6bffe4cc8d40f9465e38a12126f14bb268075bd44a4ba396630cfac8da14
|
|
BLAKE2b-256 checksum How to use checksums |
55a746cb3f99108700384bdc711c7b8ffd1fba572e66c31f9fdaa4ec530fafa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1
|
Release files / hiutils-0.2.2-py3-none-any.whl
| Download URL | hiutils-0.2.2-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84600b54a384160936172c08502e68ef845123db23adef18b5ac72f4d5afc63b
|
|
BLAKE2b-256 checksum How to use checksums |
742706226315c7a939c978e9336de8b32b0c9e19b188646caae7e1481e67cfe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1
|