Python library for loading data to TranSMART using transmart-copy
Project description
################################################################################
TranSMART loader
################################################################################
|Build status| |codecov|
.. |Build status| image:: https://travis-ci.org/thehyve/python_transmart_loader.svg?branch=master
:target: https://travis-ci.org/thehyve/python_transmart_loader/branches
.. |codecov| image:: https://codecov.io/gh/thehyve/python_transmart_loader/branch/master/graph/badge.svg
:target: https://codecov.io/gh/thehyve/python_transmart_loader
This package contains classes that represent the core domain objects stored in the TranSMART_ platform,
an open source data sharing and analytics platform for translational biomedical research.
It also provides a utility that writes such objects to tab-separated files that can be loaded into
a TranSMART database using the transmart-copy_ tool.
.. _TranSMART: https://github.com/thehyve/transmart_core
.. _transmart-copy: https://github.com/thehyve/transmart-core/tree/dev/transmart-copy
Installation and usage
**********************
To install transmart_loader, do:
.. code-block:: console
git clone https://github.com/thehyve/python_transmart_loader.git
cd python_transmart_loader
pip install .
Usage
------
Usage examples can be found in the `examples<https://github.com/thehyve/python_transmart_loader/tree/master/examples>`_ directory:
- `fhir2transmart <https://github.com/thehyve/python_transmart_loader/tree/master/examples/fhir2transmart>`_: a tool that translates core `HL7 FHIR`_ resources to the TranSMART data model.
- `ontology2transmart <https://github.com/thehyve/python_transmart_loader/tree/master/examples/ontology2transmart>`_: a tool that translates ontologies available from DIMDI_
to TranSMART ontologies.
.. _`HL7 FHIR`: http://hl7.org/fhir/
.. _DIMDI: https://www.dimdi.de
Development
*************
For a quick reference on software development, we refer to `the software guide checklist <https://guide.esciencecenter.nl/best_practices/checklist.html>`_.
Python versions
---------------
This repository is set up with Python version 3.6
Add or remove Python versions based on project requirements. `The guide <https://guide.esciencecenter.nl/best_practices/language_guides/python.html>`_ contains more information about Python versions and writing Python 2 and 3 compatible code.
Package management and dependencies
-----------------------------------
This project uses `pip` for installing dependencies and package management.
* Dependencies should be added to `setup.py` in the `install_requires` list.
Testing and code coverage
-------------------------
* Tests are in the ``tests`` folder.
* The ``tests`` folder contains:
- A test if files for `transmart-copy` are generated for fake data (file: ``test_transmart_loader``)
- A test that checks whether your code conforms to the Python style guide (PEP 8) (file: ``test_lint.py``)
* The testing framework used is `PyTest <https://pytest.org>`_
- `PyTest introduction <http://pythontesting.net/framework/pytest/pytest-introduction/>`_
* Tests can be run with ``python setup.py test``
Documentation
-------------
* Documentation should be put in the ``docs`` folder.
* To generate html documentation run ``python setup.py build_sphinx``
- Alternatively, run ``make html`` in the ``docs`` folder.
* To put the documentation on `Read the Docs <https://readthedocs.org>`_, log in to your Read the Docs account, and import the repository (under 'My Projects').
- Include the link to the documentation in this README_.
Coding style conventions and code quality
-----------------------------------------
* Check your code style with ``prospector``
* You may need run ``pip install .[dev]`` first, to install the required dependencies
Documentation
*************
.. _README:
Include a link to your project's full documentation here.
License
*******
Copyright (c) 2019, The Hyve
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Credits
*******
This package was created with `Cookiecutter <https://github.com/audreyr/cookiecutter>`_ and the `NLeSC/python-template <https://github.com/NLeSC/python-template>`_.
TranSMART loader
################################################################################
|Build status| |codecov|
.. |Build status| image:: https://travis-ci.org/thehyve/python_transmart_loader.svg?branch=master
:target: https://travis-ci.org/thehyve/python_transmart_loader/branches
.. |codecov| image:: https://codecov.io/gh/thehyve/python_transmart_loader/branch/master/graph/badge.svg
:target: https://codecov.io/gh/thehyve/python_transmart_loader
This package contains classes that represent the core domain objects stored in the TranSMART_ platform,
an open source data sharing and analytics platform for translational biomedical research.
It also provides a utility that writes such objects to tab-separated files that can be loaded into
a TranSMART database using the transmart-copy_ tool.
.. _TranSMART: https://github.com/thehyve/transmart_core
.. _transmart-copy: https://github.com/thehyve/transmart-core/tree/dev/transmart-copy
Installation and usage
**********************
To install transmart_loader, do:
.. code-block:: console
git clone https://github.com/thehyve/python_transmart_loader.git
cd python_transmart_loader
pip install .
Usage
------
Usage examples can be found in the `examples<https://github.com/thehyve/python_transmart_loader/tree/master/examples>`_ directory:
- `fhir2transmart <https://github.com/thehyve/python_transmart_loader/tree/master/examples/fhir2transmart>`_: a tool that translates core `HL7 FHIR`_ resources to the TranSMART data model.
- `ontology2transmart <https://github.com/thehyve/python_transmart_loader/tree/master/examples/ontology2transmart>`_: a tool that translates ontologies available from DIMDI_
to TranSMART ontologies.
.. _`HL7 FHIR`: http://hl7.org/fhir/
.. _DIMDI: https://www.dimdi.de
Development
*************
For a quick reference on software development, we refer to `the software guide checklist <https://guide.esciencecenter.nl/best_practices/checklist.html>`_.
Python versions
---------------
This repository is set up with Python version 3.6
Add or remove Python versions based on project requirements. `The guide <https://guide.esciencecenter.nl/best_practices/language_guides/python.html>`_ contains more information about Python versions and writing Python 2 and 3 compatible code.
Package management and dependencies
-----------------------------------
This project uses `pip` for installing dependencies and package management.
* Dependencies should be added to `setup.py` in the `install_requires` list.
Testing and code coverage
-------------------------
* Tests are in the ``tests`` folder.
* The ``tests`` folder contains:
- A test if files for `transmart-copy` are generated for fake data (file: ``test_transmart_loader``)
- A test that checks whether your code conforms to the Python style guide (PEP 8) (file: ``test_lint.py``)
* The testing framework used is `PyTest <https://pytest.org>`_
- `PyTest introduction <http://pythontesting.net/framework/pytest/pytest-introduction/>`_
* Tests can be run with ``python setup.py test``
Documentation
-------------
* Documentation should be put in the ``docs`` folder.
* To generate html documentation run ``python setup.py build_sphinx``
- Alternatively, run ``make html`` in the ``docs`` folder.
* To put the documentation on `Read the Docs <https://readthedocs.org>`_, log in to your Read the Docs account, and import the repository (under 'My Projects').
- Include the link to the documentation in this README_.
Coding style conventions and code quality
-----------------------------------------
* Check your code style with ``prospector``
* You may need run ``pip install .[dev]`` first, to install the required dependencies
Documentation
*************
.. _README:
Include a link to your project's full documentation here.
License
*******
Copyright (c) 2019, The Hyve
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Credits
*******
This package was created with `Cookiecutter <https://github.com/audreyr/cookiecutter>`_ and the `NLeSC/python-template <https://github.com/NLeSC/python-template>`_.
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
transmart_loader-0.1.0.tar.gz
(23.4 kB
view hashes)
Built Distribution
Close
Hashes for transmart_loader-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c01019045118a4e8deb0a9e3a540721fd0779528946bf7d7eb2cb1c9596f0d65 |
|
MD5 | bfd98dec2e28f97147d3687b82dd7320 |
|
BLAKE2b-256 | 9983df7e8111ad12910b22511a4bd22a8448656fe023dedf57ae9e34afe149af |