Skip to main content

ClaML ontology to TranSMART loader

Build status codecov PyPI PyPI - Downloads

This package contains a mapper that reads ontologies in Classification Markup Language (ClaML) format 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, using transmart-loader, to tab-separated files that can be loaded into a TranSMART database using the transmart-copy tool.

The packages uses the python-claml package for reading ClaML files.

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

Installation

The package requires Python 3.6.

To install claml2transmart, do:

pip install claml2transmart

Or from source:

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

Run tests (including coverage) with:

python setup.py test

Usage

Read ontology from an XML file in ClaML format 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).

claml2transmart [--code-prefix] <system> <input.xml> /path/to/output

With --code_prefix, the concept code is used as prefix for the concept label.

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

# Unzip and navigate to the classification directory
mkdir icd10gm2019syst-claml
cd icd10gm2019sys-claml
unzip ../icd10gm2019syst-claml.zip
# create an output directory
mkdir output
# apply the mapping
claml2transmart http://dimdi.de/icd10gm2019 Klassifikationsdateien/icd10gm2019syst_claml_20180921.xml 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 ClaML ontology to TranSMART loader is licensed under the MIT License. See the file LICENSE.

Metadata

Release files for claml2transmart 0.1.5

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

Source distribution (sdist)

Source distribution for claml2transmart 0.1.5
File Size Uploaded Provenance
claml2transmart-0.1.5.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 12.5 kB

Release files / claml2transmart-0.1.5.tar.gz

Download URL claml2transmart-0.1.5.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9d4842bf8d0dddb0872126a6f799d6e9638d1bb2a717ce8a43d48c3ef2b1bb75
BLAKE2b-256 checksum
How to use checksums
1b01e393eb3c81f22febe21cc8f4d8976111a07be21206c3c301a353c8252f28
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 / claml2transmart-0.1.5-py3-none-any.whl

Download URL claml2transmart-0.1.5-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ecb7b3a0acecb669e0c5972e9fb326c1f2a524d30201b9b8a8958d5451e92be1
BLAKE2b-256 checksum
How to use checksums
b76c0d726b8801d1786dc564ecd256ced0573aa796a410e19ac906c896801a0d
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

Security for claml2transmart 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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