Quality control, preprocessing and analysis of omics data for machine learning
Project description
QCP-Omics
Installation
Singularity (on HPC) - recommended
- Load singularity:
module load singularity - Pull the image from docker:
singularity pull qcp-omics.sif docker://georgelepsaya/qcp-omics:latest - Verify installation:
singularity run qcp-omics.sif
From PyPI
Requires Python version >= 3.11.
- Create a virtual environment:
python3 -m venv .venv - Activate it:
source .venv/bin/activate - Install the tool:
pip install qcp-omics - Verify installation:
qcp
Metadata File Guide
Overview
This guide explains how to create a metadata file required for running the tool in both interactive and metadata modes.
Modes of Operation
1. Interactive Mode
Command:
qcp interactive
In this mode, users interactively input metadata through CLI prompts, except for data types (dtypes). The required JSON file must contain the dtypes field to specify the data types of dataset columns.
Requirements:
- Only the
dtypesfield is required. All other metadata will be collected during CLI interaction. - Data types must be supported by pandas (e.g.,
int,float,category).
Example dtypes JSON:
{
"dtypes": {
"age": "int",
"gender": "category",
"height": "float"
}
}
2. Metadata Mode
Command:
qcp metadata path/to/metadata.json
In this mode, the entire pipeline is executed automatically based on the provided metadata JSON file.
Requirements:
- All metadata fields must be fully specified.
- The order of preprocessing steps must follow a specific sequence.
Metadata JSON Structure
Metadata Fields
| Field | Type | Description |
|---|---|---|
dataset_type |
string |
Type of dataset: clinical, genomics, or proteomics. |
dataset_path |
string |
Path to the dataset file (.csv or .tsv). |
metadata_path |
string |
Path to the metadata JSON file. |
output_path |
string |
Path to store processed datasets. |
report_path |
string |
Path to save the generated report. |
features_cols |
boolean |
true if features are in columns and samples in rows; false to transpose the dataset. |
en_header |
boolean |
true if the header and index are alphanumeric. |
is_raw |
boolean |
true if the dataset is raw (unprocessed). |
steps_to_run |
list |
Ordered list of processing steps to execute (details below). |
dtypes |
object |
Mapping of dataset columns to their data types. |
Example Metadata JSON
{
"dataset_type": "clinical",
"dataset_path": "data/clinical_data.csv",
"metadata_path": "metadata.json",
"output_path": "results/",
"report_path": "results/",
"features_cols": true,
"en_header": true,
"is_raw": true,
"steps_to_run": [
{ "step": "identify_missing_values" },
{ "step": "handle_missing_values" },
{ "step": "handle_outliers", "method": "IQR" },
{ "step": "split_train_test" },
{ "step": "split_numerical_categorical" },
{ "step": "scale_numerical_features", "method": "standard_scaler" },
{ "step": "transform_numerical_features", "method": "box-cox" },
{ "step": "descriptive_statistics" },
{ "step": "pairwise_correlations_numerical", "method": "pearson" },
{ "step": "evaluate_distribution_features" },
{ "step": "dimensionality_reduction" }
],
"dtypes": {
"age": "int",
"death": "category",
"bmi_num": "float"
}
}
Explanation of steps_to_run
Full Pipeline (when is_raw is true)
All steps must be provided in the exact order listed below:
identify_missing_valueshandle_missing_valueshandle_outliers(method required)- Methods: IQR, zscore
split_train_testsplit_numerical_categoricalscale_numerical_features(method required)- Methods: standard_scaler, robust_scaler
transform_numerical_features(method required)- Methods: box-cox, log2
descriptive_statisticspairwise_correlations_numerical(method required)- Methods: pearson, spearman
evaluate_distribution_featuresdimensionality_reduction
Partial Pipeline (when is_raw is false)
Users can select any subset of steps but must maintain the original order. For example (imagine steps are numbered):
- Valid:
[3, 5, 6, 9]→handle_outliers,split_numerical_categorical,scale_numerical_features,pairwise_correlations_numerical - Invalid:
[3, 6, 5]→handle_outliers,scale_numerical_features,split_numerical_categorical(Incorrect order)
Output
- Processed Data:
train_dataset.csvandtest_dataset.csvsaved inoutput_path
- Report:
report.htmlsaved inreport_path
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qcp_omics-0.2.4.tar.gz.
File metadata
- Download URL: qcp_omics-0.2.4.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f14fbd0ec98b985143e9fabf6a08a37af177ee42338e0163898e322ecda3aac
|
|
| MD5 |
3bc0b3e189ac9d4c2a7fed7bd01207cc
|
|
| BLAKE2b-256 |
af1228b5ca9362a86a03d34938971f9a26c2ba751b127d150ff7ae9c3d651043
|
File details
Details for the file qcp_omics-0.2.4-py3-none-any.whl.
File metadata
- Download URL: qcp_omics-0.2.4-py3-none-any.whl
- Upload date:
- Size: 36.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45e6b1c27226d4d421e8518ac8e04e85e62537df137b40ddf7968384f9f5fc27
|
|
| MD5 |
fa5744e094594f0d0f45469b26f13476
|
|
| BLAKE2b-256 |
8c186f092fef8613acc0c221aaff97d449c010be59e20fd170bdc4d8690cc7db
|