-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Documentation for the validation of a pathology folder.
- Loading branch information
1 parent
faa2443
commit 5ea6e08
Showing
1 changed file
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,49 @@ | ||
[![codecov](https://codecov.io/gh/madgik/mipdb/branch/main/graph/badge.svg?token=BGF1OU23JA)](https://codecov.io/gh/madgik/mipdb) | ||
# mipdb [![codecov](https://codecov.io/gh/madgik/mipdb/branch/main/graph/badge.svg?token=BGF1OU23JA)](https://codecov.io/gh/madgik/mipdb) | ||
|
||
mipdb is a Python tool for managing and validating pathology data. This README provides guidance on how to get started with mipdb. | ||
|
||
## Prerequisites | ||
|
||
Before you begin, ensure you have met the following requirements: | ||
|
||
- **Python**: Ensure that you have Python installed on your system. If not, you can download it from the [official Python website](https://www.python.org/downloads/). | ||
|
||
## Installation | ||
|
||
You can easily install mipdb using `pip`: | ||
|
||
```bash | ||
pip install mipdb | ||
``` | ||
|
||
## Pathology Folder | ||
|
||
### Folder Structure | ||
|
||
For optimal use of mipdb, your data folder should have the following structure: | ||
|
||
- The data folder must contain a `CDEsMetadata.json` file, which will hold the metadata of the pathology. | ||
- It should also contain the CSV file(s) related to the pathology. | ||
|
||
## Usage | ||
|
||
### Validating a Pathology Folder | ||
|
||
You can use the `validate-folder` command to validate the contents of a pathology folder: | ||
|
||
**Command**: `mipdb validate-folder <folder_path>` | ||
|
||
**Description**: | ||
- The `validate-folder` command first validates that the `CDEsMetadata.json` file has a proper format. | ||
- It then validates every CSV file in the folder against the defined Common Data Elements (CDEs) of the pathology. | ||
- You can nest multiple pathology folders within a parent folder, and the `validate-folder` command will iterate through each pathology folder. | ||
|
||
**Examples**: | ||
|
||
1. Validate a single pathology folder/nested folder with multiple pathologies: | ||
```bash | ||
mipdb validate-folder /home/user/data/dementia | ||
``` | ||
```bash | ||
mipdb validate-folder /home/user/data | ||
``` |