{ "info": { "author": "Ewelina Grudzien", "author_email": "ewelina@thehyve.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Bio-Informatics" ], "description": "################################################################################\ntransmart-hyper-dicer slicing tool for tranSMART\n################################################################################\n\n|Build status| |codecov| |pypi| |downloads|\n\n.. |Build status| image:: https://travis-ci.org/thehyve/transmart-hyper-dicer.svg?branch=master\n :alt: Build status\n :target: https://travis-ci.org/thehyve/transmart-hyper-dicer/branches\n.. |codecov| image:: https://codecov.io/gh/thehyve/transmart-hyper-dicer/branch/master/graph/badge.svg\n :alt: codecov\n :target: https://codecov.io/gh/thehyve/transmart-hyper-dicer\n.. |pypi| image:: https://img.shields.io/pypi/v/transmart-hyper-dicer.svg\n :alt: PyPI\n :target: https://pypi.org/project/transmart-hyper-dicer/\n.. |downloads| image:: https://img.shields.io/pypi/dm/transmart-hyper-dicer.svg\n :alt: PyPI - Downloads\n :target: https://pypi.org/project/transmart-hyper-dicer/\n\ntransmart-hyper-dicer is a data slicing tool that reads data from one TranSMART_ instance and uploads it to another. \n\n\u26a0\ufe0f Note: this is a very preliminary version, still under development.\nIssues can be reported at https://github.com/thehyve/transmart-hyper-dicer/issues.\n\n.. _TranSMART: https://github.com/thehyve/transmart_core\n\nConfiguration\n-------------\n\nConnection to Keycloak identity provider and tranSMART is configured by setting the environment variables below:\n\n+---------------------+--------------------------------------------------------------------------------------+\n| Variable | Description |\n+=====================+======================================================================================+\n| TRANSMART_URL | URL of the TranSMART back-end application e.g. `https://transmart.example.com` |\n+---------------------+--------------------------------------------------------------------------------------+\n| KEYCLOAK_SERVER_URL | URL of the Keycloak identity provider e.g. `https://keycloak.example.com` |\n+---------------------+--------------------------------------------------------------------------------------+\n| KEYCLOAK_REALM | Keycloak realm, e.g. `dev` |\n+---------------------+--------------------------------------------------------------------------------------+\n| KEYCLOAK_CLIENT_ID | Keycloak client ID, e.g. `transmart-client` |\n+---------------------+--------------------------------------------------------------------------------------+\n| OFFLINE_TOKEN | An offline token used used as a refresh token in order to communicate with TranSMART |\n+---------------------+--------------------------------------------------------------------------------------+\n| VERIFY_CERT | Either a boolean, in which case it controls whether the server\u2019s |\n| | TLS certificate is verified, or a string, in which case it must be a path |\n| | to a CA bundle to use. Defaults to True. |\n+---------------------+--------------------------------------------------------------------------------------+\n\nIn order to generate an offline token for ``USERNAME`` user, the following ``curl`` command can be used.\nTo get the token the user needs to have the role mapping for the realm-level: ``offline_access``.\nBefore using the command you have to substitute words in uppercase with proper ones.\n\n.. code-block:: bash\n\n curl \\\n -d 'client_id=KEYCLOAK_CLIENT_ID' \\\n -d 'username=USERNAME' \\\n -d 'password=PASSWORD' \\\n -d 'grant_type=password' \\\n -d 'scope=offline_access' \\\n 'https://KEYCLOAK_SERVER_URL/auth/realms/KEYCLOAK_REALM/protocol/openid-connect/token'\n\n\nThe value of the `refresh_token` field in the response is the offline token.\n\nAll the variables can be specified in the ``.env`` file as key-value pairs. They will be automatically set as environment variables, when starting the application. Example of the ``.env`` file:\n\n.. code-block:: bash\n\n KEYCLOAK_CLIENT_ID=transmart-client\n KEYCLOAK_SERVER_URL=https://keycloak.example.com\n KEYCLOAK_REALM=dev\n OFFLINE_TOKEN=\n TRANSMART_URL=https://transmart.example.com\n\n\nInstallation\n------------\n\nThe package requires Python 3.6+.\n\nTo install ``transmart-hyper-dicer``, do:\n\n.. code-block:: bash\n\n pip install transmart-hyper-dicer\n\nOr from source:\n\n.. code-block:: bash\n\n git clone https://github.com/thehyve/transmart-hyper-dicer.git\n cd transmart-hyper-dicer\n pip install .\n\n\nRun tests (including coverage) with:\n\n.. code-block:: bash\n\n python setup.py test\n\n\nUsage\n-----\n\nRead subset of data from the configured tranSMART instance, based on the constraint specified in an input JSON file\nand write the output in transmart-copy_ format to /path/to/output.\nThe output directory should be empty of not existing (then it will be created).\n\nInput constraint has to be a `valid tranSMART constraint`_. Example of file content:\n\n.. code-block:: JSON\n\n {\n \"type\": \"study_name\",\n \"studyId\": \"EHR\"\n }\n\n\nRun:\n\n.. code-block:: bash\n\n transmart-hyper-dicer /path/to/output\n\n\nThis generates the directories ``i2b2metadata`` and ``i2b2demodata`` in the ``output`` directory.\nThe generated data can be loaded using transmart-copy_:\n\n.. code-block:: console\n\n # Download transmart-copy:\n curl -f -L https://repo.thehyve.nl/service/local/repositories/releases/content/org/transmartproject/transmart-copy/17.1-HYVE-6.2/transmart-copy-17.1-HYVE-6.2.jar -o transmart-copy.jar\n # Load data\n PGUSER=tm_cz PGPASSWORD=tm_cz java -jar transmart-copy.jar -d output\n\n\n.. _transmart-copy: https://github.com/thehyve/transmart-core/tree/dev/transmart-copy\n.. _`valid tranSMART constraint`: https://transmart.thehyve.net/open-api/index.html\n\nPackage management and dependencies\n-----------------------------------\n\nThis project uses `pip` for installing dependencies and package management.\n\n* Dependencies should be added to `setup.py` in the `install_requires` list.\n\n\nLicense\n-------\n\nCopyright (c) 2019 The Hyve B.V.\n\nThe Transmart Hyper Dicer is licensed under the MIT License. See the file ``_.\n\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thehyve/transmart-hyper-dicer", "keywords": "transmart-hyper-dicer,transmart", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "transmart-hyper-dicer", "package_url": "https://pypi.org/project/transmart-hyper-dicer/", "platform": "", "project_url": "https://pypi.org/project/transmart-hyper-dicer/", "project_urls": { "Homepage": "https://github.com/thehyve/transmart-hyper-dicer" }, "release_url": "https://pypi.org/project/transmart-hyper-dicer/0.1.3/", "requires_dist": [ "click (==7.0)", "pandas (<0.26,>=0.25)", "pydantic (<0.33,>=0.32)", "python-dotenv (==0.10.3)", "PyYAML (<5.2,>=5.1)", "requests (==2.22.0)", "transmart-loader (==1.3.3)", "prospector[with_pyroma] ; extra == 'dev'", "pygments ; extra == 'dev'", "yapf ; extra == 'dev'", "isort ; extra == 'dev'" ], "requires_python": ">=3.6.0", "summary": "Data slicing tool for reading data from one tranSMART and uploading it to another", "version": "0.1.3" }, "last_serial": 5920476, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7fc55f9e4f28a8cb9eef6edbd3841a3d", "sha256": "b284aacd569bf0ad69bbc3eaff0408c5dcddc5fe771bdf220c6c38decfbaf16d" }, "downloads": -1, "filename": "transmart_hyper_dicer-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7fc55f9e4f28a8cb9eef6edbd3841a3d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 19053, "upload_time": "2019-07-26T13:40:15", "url": "https://files.pythonhosted.org/packages/37/99/0b66fa662643244788f960682dec0b476bb9e323add15d0ac029aba597ac/transmart_hyper_dicer-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "952344fd9962c1634ae7fc6f0a64cd6f", "sha256": "9072a5bd83559a8d9f052c969303543e8a9897a7e06ce9f3ed2f2ab1d04b277d" }, "downloads": -1, "filename": "transmart-hyper-dicer-0.0.1.tar.gz", "has_sig": false, "md5_digest": "952344fd9962c1634ae7fc6f0a64cd6f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 12981, "upload_time": "2019-07-26T13:40:17", "url": "https://files.pythonhosted.org/packages/61/b1/5395f8151256355a8384945ff18b7577166eeaaa133fdb1b860ef60c471c/transmart-hyper-dicer-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1f8d61cbab68ddd9330b7058cd53fdf2", "sha256": "54fcda4e6a9aa6f9f2391d8cc257e432ec88f0be5769886d9a1f128c2537b300" }, "downloads": -1, "filename": "transmart_hyper_dicer-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1f8d61cbab68ddd9330b7058cd53fdf2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 17753, "upload_time": "2019-08-16T15:09:03", "url": "https://files.pythonhosted.org/packages/9f/38/e5647331744be8d24422ad4938bc5b2968a5a8c01209d2bda67db0189d48/transmart_hyper_dicer-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02b015f3d3cccb501d3435f2c1b3c75a", "sha256": "340cd5b52fcc5f29f69e97120e8cd20a86b51eaa3d60d24f6edb2030ad39d195" }, "downloads": -1, "filename": "transmart-hyper-dicer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "02b015f3d3cccb501d3435f2c1b3c75a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 15652, "upload_time": "2019-08-16T15:09:05", "url": "https://files.pythonhosted.org/packages/c2/29/0f79a6f3960bac7c6d54f0c79940ad14a547e7261d5c83e44d5ea1f9a614/transmart-hyper-dicer-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "bc196c716ff6a1d5d826f434b03dc550", "sha256": "7529707fb02e827b5a048b5e94b73e402fd7d3a4566bf3a5ab61b513e0fafd02" }, "downloads": -1, "filename": "transmart_hyper_dicer-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bc196c716ff6a1d5d826f434b03dc550", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 17870, "upload_time": "2019-08-20T14:15:57", "url": "https://files.pythonhosted.org/packages/c5/6a/59d67f6b0108b7e3b0bcd5752bb426d77d614da13d8aed4f268e5465f9d0/transmart_hyper_dicer-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc5d6718b5db8986bbb00eda87c859c1", "sha256": "b8447b69951005037f10ef67f4038b896d2d18b06d75a08a34701e76f91b0d5f" }, "downloads": -1, "filename": "transmart-hyper-dicer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "cc5d6718b5db8986bbb00eda87c859c1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 15758, "upload_time": "2019-08-20T14:15:58", "url": "https://files.pythonhosted.org/packages/09/e4/7fc3af8dd3eec481fd2f00f87a3fb8bb8a7cbe37f989344608e69669cad5/transmart-hyper-dicer-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8f6a35218865d0aa508f41dbf1e5793d", "sha256": "f4cc3e4664b5a62a65b16fdc74f009fd62373c6e926bd78e9eb021b49a17f05b" }, "downloads": -1, "filename": "transmart_hyper_dicer-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8f6a35218865d0aa508f41dbf1e5793d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 18018, "upload_time": "2019-08-21T14:56:19", "url": "https://files.pythonhosted.org/packages/38/1a/ffe72b1a57178ceefa426c1337e38d78412ce2aebec3f40ec971590295ed/transmart_hyper_dicer-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca69a6781d58bff5a12455e34a2ccbc9", "sha256": "8fd3105bea10b9645ef9c562932bc604b0bc578d8b20d6aac33ee3dbe79c5eb2" }, "downloads": -1, "filename": "transmart-hyper-dicer-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ca69a6781d58bff5a12455e34a2ccbc9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 15874, "upload_time": "2019-08-21T14:56:21", "url": "https://files.pythonhosted.org/packages/9b/bf/041f53753b7b445358038f3dac906f1738738497bfbf5234b97cefd56c20/transmart-hyper-dicer-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "83db15ae2278d724bb85791b637f1a01", "sha256": "4b187338e93b2343e8323f479c28cdfeb05c75a7eabf1efb16efe83d1c0746be" }, "downloads": -1, "filename": "transmart_hyper_dicer-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "83db15ae2278d724bb85791b637f1a01", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 18173, "upload_time": "2019-10-02T20:58:20", "url": "https://files.pythonhosted.org/packages/d5/23/4c4fcbf8b4ff58bffb4890e8ccf1809452fcf50124e851e449b7585e2c7f/transmart_hyper_dicer-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88bfc4f0ff9e06a9de2e34e7adbf081b", "sha256": "0babfa11af43f15e4a06d799f5fea30906dcb70aa763ad0b38928a879c2a1767" }, "downloads": -1, "filename": "transmart-hyper-dicer-0.1.3.tar.gz", "has_sig": false, "md5_digest": "88bfc4f0ff9e06a9de2e34e7adbf081b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 13795, "upload_time": "2019-10-02T20:58:22", "url": "https://files.pythonhosted.org/packages/8f/e2/fef5c7502a50ee7b78f2314300332c723877e6d948240c41a300242bbacd/transmart-hyper-dicer-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "83db15ae2278d724bb85791b637f1a01", "sha256": "4b187338e93b2343e8323f479c28cdfeb05c75a7eabf1efb16efe83d1c0746be" }, "downloads": -1, "filename": "transmart_hyper_dicer-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "83db15ae2278d724bb85791b637f1a01", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 18173, "upload_time": "2019-10-02T20:58:20", "url": "https://files.pythonhosted.org/packages/d5/23/4c4fcbf8b4ff58bffb4890e8ccf1809452fcf50124e851e449b7585e2c7f/transmart_hyper_dicer-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88bfc4f0ff9e06a9de2e34e7adbf081b", "sha256": "0babfa11af43f15e4a06d799f5fea30906dcb70aa763ad0b38928a879c2a1767" }, "downloads": -1, "filename": "transmart-hyper-dicer-0.1.3.tar.gz", "has_sig": false, "md5_digest": "88bfc4f0ff9e06a9de2e34e7adbf081b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 13795, "upload_time": "2019-10-02T20:58:22", "url": "https://files.pythonhosted.org/packages/8f/e2/fef5c7502a50ee7b78f2314300332c723877e6d948240c41a300242bbacd/transmart-hyper-dicer-0.1.3.tar.gz" } ] }