NEXT-FRET is a Python package that implements a time-varying Gaussian Mixture Model, designed for the analysis of single-molecule FRET (smFRET) measurements. tvGMM dissects dynamic folding behaviors and identifies transient intermediate states in smFRET experiments. NEXT-FRET utilizes the Expectation–Maximization (EM) algorithm to iteratively estimate tvGMM’s parameters. It also supports the incorporation of prior knowledge about the expected conformational states allowing for improved robustness and interpretability, particularly in low-sample or noisy regimes.
Clone this repository and install the dependencies:
pip install -r requirements.txtThis script runs one of the example datasets and stores the results in a results_* directory. Other scripts in code/real_examples can be run in the same manner.
python -m code.real_examples.run_MBPThis script runs one of the example datasets and stores the results in a results_* directory. Other scripts in code/real_examples can be run in the same manner.
The real examples expect the Excel workbook data/folding_data.xlsx with worksheets named after the different datasets. Adjust the DATA_FILE variable inside each script if needed.
from code.Analysis import tvGMM
from code.EM_K_tools import load_synthetic_exeperiment
# Load example data
W_true, MeansStds_true, K_true, e_data, t_data, *_ = load_synthetic_exeperiment()
# Initial guesses
init_means = [0.10, 0.30, 0.50, 0.70]
init_stds = [0.05] * 4
# Build and run the model
model = tvGMM(e_data, t_data, K_true, dimt=5, method='Splines',
initial_means=init_means, initial_stds=init_stds)
model.setup_synthetic(MeansStds_true, K_true)
W_est, means_est, stds_est = model.EM_algorithm(max_iters=300, path='results/')├── code/
│ ├── Analysis.py # tvGMM implementation
│ ├── EM_K_tools.py # Helper functions
│ └── real_examples/ # Example scripts using the model
├── requirements.txt # Required Python packages
├── data/ # `folding_data.xlsx` workbook
└── results/ # Output files will appear here
This project is licensed under the Apache License 2.0.
If you use tvGMM in academic work, please cite the relevant paper on time-varying GMM for smFRET analysis:
@article{preprint_2025_07_30_666321v1,
author = {Chara Sarafoglou and Andreas Kofidis and Marijn de Boer and Mikis Mylonakis and Kostas Mavrakis and Giannis Zacharakis and Yannis Pantazis and Giorgos Gouridis},
title = {NEXT-FRET: A solution-based smFRET platform to resolve folding intermediates under native conditions},
journal = {bioRxiv},
year = {2025},
doi = {10.1101/2025.07.30.666321v1},
url = {https://www.biorxiv.org/content/10.1101/2025.07.30.666321v1},
}