This is a scikit-learn compatible Python implementation of Stabl, coupled with useful functions and
example notebooks to rerun the analyses on the different use cases located in the sample data
folder
Adoption of high-content omic technologies in clinical studies, coupled with computational methods, has yielded an abundance of candidate biomarkers. However, translating such fndings into bona fde clinical biomarkers remains challenging. To facilitate this process, we introduce Stabl, a general machine learning method that identifes a sparse, reliable set of biomarkers by integrating noise injection and a data-driven signal-to- noise threshold into multivariable predictive modeling. Evaluation of Stabl on synthetic datasets and fve independent clinical studies demonstrates improved biomarker sparsity and reliability compared to commonly used sparsity-promoting regularization methods while maintaining predictive performance; it distills datasets containing 1,400–35,000 features down to 4–34 candidate biomarkers. Stabl extends to multi-omic integration tasks, enabling biological interpretation of complex predictive models, as it hones in on a shortlist of proteomic, metabolomic and cytometric events predicting labor onset, microbial biomarkers of pre-term birth and a pre-operative immune signature of post-surgical infections.
Full content: https://rdcu.be/du2gB
Hédou, J., Marić, I., Bellan, G. et al. Discovery of sparse, reliable omic biomarkers with Stabl. Nat Biotechnol (2024). https://doi.org/10.1038/s41587-023-02033-x
or by following this link
Python version : from 3.7 up to 3.12
Python packages:
In order to install the light-weight version of the library, you have two options:
pip install git+https://github.com/gregbellan/Stabl.git@v1.0.1-lw
Clone the repository and install the library:
a. Download Stabl:
git clone https://github.com/gregbellan/Stabl.git@stabl_lw
b. Install requirements and Stabl:
cd Stabl
pip install .
The general installation time is less than 10 seconds, and have been tested on mac OS and linux system.
You may need to install CMake to fully use the library. Please refer to the section CMake installation in full version installation for more details.
Python version : from 3.7 up to 3.10
Python packages:
Julia package for noise generation (version 1.9.2) :
To install Julia, please follow these instructions:
Install the required julia packages :
julia -e 'using Pkg; Pkg.add(name="Bigsimr", version="0.8.7"); Pkg.add(name="Distributions", version="0.25.98"); Pkg.add(name="PyCall", version="1.96.1"); Pkg.add("IJulia")'
pip install julia
python -c "import julia; julia.install()"
In order to install the python libraries required to generate the noise, we need to install :
You can install this module by :
Install Directly from github (install latest release):
pip install git+https://github.com/gregbellan/Stabl.git
pip install numpy==1.23.2
or
Download Stabl:
git clone https://github.com/gregbellan/Stabl.git
Install requirements and Stabl:
cd Stabl
pip install .
pip install numpy==1.23.2
The general installation time is less than 10 seconds, and have been tested on mac OS and linux system.
NOTE: There is a behavior with Julia library:
- you can run the script in a notebook, but you need to run the import block two times. The first will throw an error and the second one will finalize the import.
- It is not possible to run the script in command line if you are installing the library with conda To resolve this issue, either you install the library without conda or you run the script into a notebook.
If there is still an issue with Julia in a notebook, run the following command in the first cell of the notebook:
from julia.api import Julia jl = Julia(compiled_modules=False)
To use the library and the associated benchmark in the folder Notebook examples
, you need to download the repository :
git clone https://github.com/gregbellan/Stabl.git
cd Stabl/
unzip Sample\ Data/data.zip -d Sample\ Data/
Tutorial Notebook.ipynb
: Tutorial on how to use the libraryrun_cv_*.py
: Python scripts to run the sample datas in Cross-Validationrun_val_*.py
: Python scripts to run the sample datas in Training-Validationrun_synthetic_*.py
: Python scripts to run the synthetic benchmarks. Available only for the full version of the library.NOTE: The different scripts may take some time to begin because of the dependence with julia. However, once started, the time to run should come back to normal.
When using your own data, you have to provide
The "Sample Data" folder contains data for the following use cases:
150
samples — 53
patients 150
samples — 1317
biomarkers150
samples — 1502
biomarkers150
samples — 3529
biomarkers
27
samples — 10
patients 21
samples — 1317
biomarkers27
samples — 1502
biomarkers43
) Vs. Severe (25
)68
samples — 1463
biomarkers
125
) Vs. Severe (659
)784
samples — 1420
biomarkers63
) Vs. Preeclampsia (96
) — 48
patients159
samples — 37184
biomarkers77
) Vs. SSI (16
)93
samples — 1125
biomarkers91
samples — 721
biomarkers609
) Vs. Non-preterm (960
) - 580 patients1569
samples — 3725
biomarkers1569
samples — 5468
biomarkers