Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 2.63 KB

README.md

File metadata and controls

89 lines (60 loc) · 2.63 KB

MIP Common Data Elements Metadata Schema Tool (mip_schema)

Latest GitHub Release Latest GitHub Release Date DOI

Open-source Python package to manipulate Common Data Elements Metadata Schema for the Medical Informatics Platform (MIP).

How to install?

For the user

  1. Create your installation directory, go to this directory, and create a new virtual Python 3.9 environment:
$ mkdir -p "/installation/directory"
$ cd "/prefered/directory"
$ virtualenv venv -p python3.9
  1. Activate the environment and install the package, at a specific version, directly from GitHub with Pip:
$ source ./venv/bin/activate
(venv) $ pip install git+https://github.com/HBPMedical/[email protected]

For the developer

  1. Clone the Git repository in your prefered directory:
$ cd "/prefered/directory"
$ git clone [email protected]:HBPMedical/mip_schema.git
  1. Go to the cloned repository and create a new virtual Python 3.9 environment:
$ cd mip_schema
$ virtualenv venv -p python3.9
  1. Activate the environment and install the package with Pip:
$ source ./venv/bin/activate
(venv) $ pip install -e .

Available command-line tools

mip_schema_update

Script to update the CDES JSON/EXCEL file pair to make this process more reproducible.

Usage

In a terminal, you can run it with the folllowing command:

$ mip_schema_update \
    --cdes_json_file "/path/to/CDEsMetadata.json" \
    --cdes_excel_file "/path/to/myCDEs.xlxs" \
    --command "remove_dashes_and_underscores" \
    --output_suffix "updated" \
    --log_file "/path/to/CDEs_update.log" 

Note: You can use the option -hto show more help about command usage.

Available commands:

  • remove_dashes_and_underscores: Remove dashes and underscores.

mip_schema_convert_from_json

Script to convert the CDES in JSON format back to the EXCEL format ingested by the Data Catatog.

Usage

In a terminal, you can run it with the folllowing command:

$ mip_schema_convert_from_json \
    --json "/path/to/CDEsMetadata.json" \
    --excel "/path/to/myOutputCDEs.xlxs" \

Note: You can also use the option -hto show more help about command usage.

Funding

This project received funding from the European Union's H2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3, as part the Medical Informatics Platform (MIP)).