Sovereign 8s.is mirror of standardgalactic/EpilepsyBiomarkerDrugs
- Python 65.2%
- R 34.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| code | ||
| Data | ||
| Epilepsy_Figures | ||
| Results | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
Epilepsy Transcriptomic Biomarker Pipeline
This repository implements a modular machine-learning pipeline for epilepsy biomarker discovery from RNA-seq matrices. It includes cross-validated model training, explainability (SHAP & permutation importance), and external validation.
Structure
epilepsy-ml-full/
├─ epilepsy_ml/
│ ├─ __init__.py
│ ├─ data_utils.py # data loading/preprocessing helpers
│ ├─ models.py # classifiers, CV training
│ ├─ evaluation.py # metrics, ROC/PR/calibration/CM/thresholds
│ ├─ explainability.py # SHAP & permutation importance
│ ├─ external_validation.py # RF fold-training and external validation
│ └─ visualization.py # matplotlib styles and helpers
├─ scripts/
│ ├─ run_training.py # train + evaluate all models under CV
│ ├─ run_explainability.py # run SHAP & permutation importance
│ └─ run_external_val.py # RF external validation on independent set
├─ data/ # place your CSVs here (not tracked)
├─ results/ # generated outputs
├─ notebooks/ # optional exploratory notebooks
├─ requirements.txt
└─ setup.py
Quickstart
pip install -r requirements.txt
# 1) Train with CV and generate figures/CSVs
python scripts/run_training.py --input data/ML_matrix.csv --out results
# 2) Explainability (SHAP & permutation) using best model found in CV
python scripts/run_explainability.py --input data/ML_matrix.csv --out results
# 3) External validation with Random Forest
python scripts/run_external_val.py --train data/ML_matrix.csv --test data/external_validation.csv --out results
Input CSV format
- First column = Sample ID
- Last column = Label (0 = non-epileptic, 1 = epileptic)
- Middle columns = gene expression features (one column per gene symbol).
License
MIT