Skip to main content

Build status codecov PyPI PyPI - Downloads

This package contains a mapper that reads ontologies from DIMDI (Deutsche Institut für Medizinische Dokumentation und Information) and translates them to the data model of the TranSMART platform, an open source data sharing and analytics platform for translational biomedical research.

It also provides a utility that applies the mapper and writes the translated data to tab-separated files that can be loaded into a TranSMART database using the transmart-copy tool.

⚠️ Note: this is a very preliminary version, still under development. Issues can be reported at https://github.com/thehyve/python_ontology2transmart/issues.

Installation

The package requires Python 3.6.

To install ontology2transmart, do:

pip install ontology2transmart

Or from source:

git clone https://github.com/thehyve/python_ontology2transmart.git
cd python_ontology2transmart
pip install .

Run tests (including coverage) with:

python setup.py test

Usage

Read ontology from a collection of TSV files from DIMDI and write the output in transmart-copy format to /path/to/output. The output directory should be empty of not existing (then it will be created).

ontology2transmart <system> <chapters> <groups> <codes> /path/to/output

Parameters:

system:

Unique identifier for the ontology

chapters:

Semicolon-separated file with chapters

groups:

Semicolon-separated file with groups

codes:

Semicolon-separated file with codes

/path/to/output:

Output directory

Example: the ICD-10-GM (German modification of ICD-10) is available at icd10gm2019syst-meta.zip.

# Unzip and navigate to the classification directory
mkdir icd10gm2019
cd icd10gm2019
unzip ../icd10gm2019syst-meta.zip
cd Klassifikationsdateien
# create an output directory
mkdir output
# apply the mapping
ontology2transmart http://dimdi.de/icd10gm2019 icd10gm2019syst_kapitel.txt icd10gm2019syst_gruppen.txt icd10gm2019syst_kodes.txt output

This generates the directories i2b2metadata and i2b2demodata in the output directory. The generated data can be loaded using transmart-copy:

# Download transmart-copy:
curl -f -L https://repo.thehyve.nl/service/local/repositories/releases/content/org/transmartproject/transmart-copy/17.1-HYVE-5.9-RC3/transmart-copy-17.1-HYVE-5.9-RC3.jar -o transmart-copy.jar
# Load data
PGUSER=tm_cz PGPASSWORD=tm_cz java -jar transmart-copy.jar -d output

Acknowledgement

This project was funded by the German Ministry of Education and Research (BMBF) as part of the project DIFUTURE - Data Integration for Future Medicine within the German Medical Informatics Initiative (grant no. 01ZZ1804D).

License

Copyright (c) 2019 The Hyve B.V.

The ontology to TranSMART loader is licensed under the MIT License. See the file LICENSE.

Metadata

Release files for ontology2transmart 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ontology2transmart 0.1.2
File Size Uploaded
ontology2transmart-0.1.2.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ontology2transmart 0.1.2
File Interpreter ABI Platform
ontology2transmart-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / ontology2transmart-0.1.2.tar.gz

Download URL ontology2transmart-0.1.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
03ae2d0c1ba9166f6e9107949ba14c22b7a929b35b0b4fca900050d0223a80ba
BLAKE2b-256 checksum
How to use checksums
de094c7f737938f8ae2e4977cbcb91f4f40be74cb180c4894cc28837b40d3cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.1

Release files / ontology2transmart-0.1.2-py3-none-any.whl

Download URL ontology2transmart-0.1.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff076f6450573a188ad9c7c1a8b653ab269717e569073d20a5689b7dc011d928
BLAKE2b-256 checksum
How to use checksums
1a3b8944ef43a2ddf6de01c5c28cd7897f6b6fbc509dd53519f587603852ad25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page