Skip to content

zivanovicmkg/RedoxAI-RDI

Repository files navigation

RedoxAI-RDI

Python toolkit implementing the Redox Disturbance Index, first iteration (RDIv1) — a composite quantitative descriptor that integrates multiple redox-related biochemical parameters into a single score for comparative analysis of cellular redox dynamics across experiments, treatments, and datasets.

The current implementation is based on the fifth and final internal training iteration of the underlying ElasticNet model conducted during development. For this reason, several script and data filenames carry the suffix _v5 as a development artifact; the index itself, as published, is RDIv1. Future versions of the index (RDIv2 onward) will incorporate additional redox modules and biological contexts in subsequent releases of this package.

This repository contains the core scripts, AI-derived weights, and utilities supporting RDIv1.

📌 Repository contents

1. normalize_redox.py

Purpose: Normalizes raw redox measurements (superoxide, nitrites, H₂O₂, GSH, GSSG) on a 0–1 scale per viable cell. No machine learning — deterministic preprocessing.

Output: redox_data_normalized.csv

2. learn_weights_ai_v5.py

Purpose: Learns feature weights using ElasticNetCV, PolynomialFeatures and GroupKFold validation. This is the core AI model behind RDIv1 (5th internal training iteration).

Output files:

  • ai_learned_weights_v5.csv
  • RDI_AI_v5_vs_Viability.png
  • feature_importance_v5_rf.png
  • ai_weight_distribution_v5.png
  • v5_cv_scores.txt

3. compute_rdi_v5.py

Purpose: Generates the final RDIv1 score and RDI_v5_score_0_100 using:

  • normalized CSV
  • AI-derived weights

Features:

  • single + interaction terms
  • automatic orientation (higher RDI = lower viability)
  • robust scaling (percentiles 5–95)
  • quick-start mode

Output: redox_data_with_RDI_v5.csv

4. rdi_visual_v5.py

Purpose: Visual verification of RDIv1 results.

Generates:

  • histogram
  • RDI vs viability scatter (R² + Pearson)
  • time-course or concentration plots

5. scaler_v5.json

Stored means and standard deviations used during development of RDIv1 (5th internal training iteration).

6. ai_learned_weights_v5.csv

Final machine-learned weights used for RDIv1 computation (5th internal training iteration).

📁 Suggested structure

RedoxAI-RDI/
│
├─ scripts/
│   (all python scripts + model files)
│
├─ data/
│   example_input.csv (optional)
│
├─ README.md
└─ requirements.txt

🐍 Python requirements

Python: 3.10+ recommended

Libraries:

numpy
pandas
scikit-learn
matplotlib

▶️ Basic usage

Note: The _v5 suffix in filenames refers to the internal training iteration used during development, not to the version of the published index. The published index is RDIv1.

Step 1 — normalize

python normalize_redox.py

Step 2 — learn weights (optional)

python learn_weights_ai_v5.py

Step 3 — compute RDIv1

python compute_rdi_v5.py --input-csv redox_data_normalized.csv --weights-csv ai_learned_weights_v5.csv

Step 4 — visualize

python rdi_visual_v5.py --csv redox_data_with_RDI_v5.csv

📘 Citation

Please cite this software package as:

Zivanovic M. RedoxAI-RDI v1.0.1: Python toolkit implementing the Redox Disturbance Index, first iteration (RDIv1). Zenodo. https://doi.org/10.5281/zenodo.17710418

📄 License

MIT License

✉️ Contact

Dr. Marko Živanović

Redefining Biology for the Next Generation

About

Python tools for Redox Disturbance Index (RDI): computing, analyzing and visualizing cellular redox balance

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages