mipdb is a tool to validate datasets for the MIP platform.
Before you begin, ensure you have met the following requirements:
- Python 3.8
- pip
-
Update Package List:
sudo apt update
-
Install Python 3.8:
sudo apt install python3.8
-
Verify Python 3.8 Installation:
python3.8 --version
-
Install pip for Python 3.8:
sudo apt install python3-pip
-
Verify pip Installation:
python3.8 -m pip --version
-
Install mipdb Using pip:
python3.8 -m pip install mipdb
-
Update PATH to Include Local Binary Directory:
Run this command to dynamically fetch the user base path and update the PATH environment variable:
export PATH="$PATH:$(python3.8 -m site --user-base)/bin"
To make this change permanent, add this line to your
~/.bashrc
or~/.profile
file:echo 'export PATH="$PATH:$(python3.8 -m site --user-base)/bin"' >> ~/.bashrc source ~/.bashrc
or
echo 'export PATH="$PATH:$(python3.8 -m site --user-base)/bin"' >> ~/.profile source ~/.profile
Command:
mipdb validate-folder <folder_path>
Description:
- The command enforces the following requirements:
- First, the metadata file itself is validated.
- Secondly, the CSV files in the folder are validated against the metadata.
- You can nest multiple pathology folders within a parent folder, and the
validate-folder
command will automatically iterate through each pathology folder.
- The folder has to comply with these requirements: https://github.com/HBPMedical/mip-deployment/blob/master/doc/NewDataRequirements.md
Examples:
mipdb validate-folder /home/user/data/dementia
mipdb validate-folder /home/user/data