Skip to content

JMB-Scripts/Michaelis-Menten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Michaelis-Menten Equation Fitting Tool

It was written for UGA students to use during biochemistry practicals in L2, L3, and M1.

This tool allows users to input data for substrate concentration (S0) and observed reaction rates (v0) to fit the Michaelis-Menten equation. The application provides a graphical user interface to input the data and visualize the curve-fitting results easily.

If you found this project useful, used it, or needed to customize it (e.g., adding more lines or columns), please let me know! Your feedback is essential to help me improve and continue this project. You can reach out to me via email.

Stand-alone version for Windows, Mac, Linux (is coming) are avalible at the end of the page

The last version of the script is MM-fit-Qt-v3.5.py

Version 3.5 Major update

🔄 Version 3.5 — Latest Release

Released: April 2025 Status: Stable

✨ New Features:

1- Unlimited Series or data points

2- Multi-column selector: Added a dropdown to select both substrate concentration and velocity columns.

3- Dynamic Excel-style paste: Replaced fixed input system with an Excel-compatible “Paste” button that auto-parses tabular data.

4- Clear separation between data and control: UI is now split more clearly into a table area and a control panel on the right.

5- Autoscale on plot: The plot now autoscales and includes dynamic titles and axis labels based on selected columns.

6- Output display: Fit results for V_{\max} and K_m are now shown in a clear text box.

7- Save plot functionality: Added a “Save Plot” button to export the fit graph as a PNG image.

đź›  Improvements :

1- GUI layout rewritten using QGridLayout and QVBoxLayout for better readability and structure.

2- Error handling for non-numeric or missing data is now more robust.

3- Fitting function supports NaN filtering and pre-checks for fit quality.

Features:

1- Paste kinetic data directly from Excel.

2- Select substrate concentration and velocity columns.

3- Fit data to the Michaelis-Menten equation using nonlinear regression.

4- View fitted V_{\max}, K_m, and plot the fitted curve.

5- View Lineweaver-Burk plot and have the lienar regression

6- Exclude odd value from the fit for MM and LB

7- Clean, interactive GUI built with PyQt5.

8- Save plots as PNG or print them MM plot and LB plot

Dependencies:

The following Python libraries are required: • PyQt5 • numpy • pandas • matplotlib • scipy

Installation:

Ensure you have Python installed on your system.

Install the required packages using pip:

# Create and activate a virtual environment (optional but recommended)
python -m venv mmfit-env
source mmfit-env/bin/activate
# On Windows use: mmfit-env\Scripts\activate

Install required packages

pip install PyQt5 numpy pandas matplotlib scipy

or

conda create -n mmfit-env python=3.12
conda activate mmfit-env
conda install pyqt5 numpy pandas matplotlib scipy

Video tutorial:

MM-Fit-tutorial.mp4

Usage:

  1. If python is present on your system then run the script:
python MM-Fit-vXX.py

image

or use the stand-alone for Window, Mac.app, or Linux (link below) double click on the file:

MM-fit-Qt-v3.5.exe

image

  1. A window will popup:

image

  1. Copy cells in Excel (make sure that values are in scientific format)

image

  1. Then on the GUI click on "1- Paste from Excel"

image

  1. Click on "2- MM-Fit" to fit the Michaelis-Menten equation and visualize the results.

Micahelis Menten representation with the fit (Km, Vmax, and R^2) :

image

At the bottom of the plot you can see residuals (Exp values - Fit values) with a color cone for values at +/- 10% from the fit value.

  1. Click LB plot to draw Lineweaver and Burk Plot to get the plot :

image

Check on Display linear fit to get values from the linear regression

image

you can click on print to print or to save as PDF

Close the LB plot window to get back to the GUI

  1. Click on "4- Exclude data" to exclude some value to improve the fit for one or several series.

image

Check the values that seem a bit odd to exclude them for the MM fit and Lineweaver and Burk Plot:

image

Then click on "Apply and Refit", the new fit appears without the exclude values. Note that exclude values appears as crosses on the plot

MM-plot

image

Or LB plot

image
  1. Click on "Reset " to clear all the fields and reset checked checboxes, and start over.

  2. Click on "Quit" to quit

Notes:

  1. Ensure all values are valid and in the correct format like 12E03 (for 12000 e.g., scientific notation) before fitting.

  2. In principle, it should accept numbers with commas or dots i.e. 1,2E-03 or 1.2E-03.

  3. If copying from Excel, ensure the data is in two columns with the substrate concentration in the first column and the observed reaction rate in the second.

  4. /!\ TAke only the values not the text /!.

  5. It's possible to make an exe file for Windows using "pyinstaller" or "py2app", to distribute the script on computers that don't have Python install:

    For windows

       pyinstaller -F MM-vXX.py

    For Mac

       pyinstaller -F MM-vXX.py

    For Linux

       pyinstaller -F MM-vXX.py 

    /!\ For the first run be patient, the embeded matplotlib needs to compile and it takes sometimes /!.

  6. Stand-alone versions are here :

=> For Mac :

Get it from Here

(if it doesn't start go to Privacy & Security and click on open anyway)

=> For Windows :

Just one file (it will be slow start, but can be place anywhere)

Get it from Here

(the exe files plus one folder for libraries (start faster, but you need to keep the exe close to the libraries folder)

Get it from Here

=> For Linux:

coming soon

Don't hesitate to reach me if you need help setting it up reach out to me via email.

About

Fit enzymatic kinetics data set directly from excel with the Michaelis-Menten equation

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages