Clonalyzer is a modular toolkit for kinetic and stoichiometric analysis of CHO fed-batch cultures. It supports per-interval, grouped, and exponential-phase analyses with high-quality visualizations.
Designed for bioprocess engineers and data scientists working with clonal cell line characterization.
Clonalyzer is a modular Python toolkit for the kinetic and stoichiometric analysis of mammalian cell cultures, particularly designed for fed-batch bioprocesses using CHO cells. It helps quantify growth rates, nutrient consumption, metabolite production, yields, and specific ratesβper replicate or per clone.
π Use cases include:
- Comparing clone performance in early-stage screening
 - Monitoring nutrient and metabolite profiles over time
 - Estimating growth and productivity during the exponential phase
 - Generating clean, publication-ready plots
 
Although Clonalyzer was designed with fed-batch CHO processes in mind, it is not limited to them. For instance:
- Block 3 (exponential-phase analysis) can be used for any batch process.
 - Block 1 and 2 support general interval or time-based profiling, including perfusion or hybrid strategies.
 
Clonalyzer computes the following parameters for each Clone Γ Replicate:
| Parameter | Symbol | Units | Description | 
|---|---|---|---|
| Growth rate | ΞΌ | hβ»ΒΉ | Calculated as slope of ln(VCD) over time | 
| Integrated viable cell density | IVCD | cellsΒ·hΒ·mLβ»ΒΉ or cellsΒ·h | Area under the VCD curve over time (trapezoidal rule) | 
| Cell balance | βX | cells | Difference in viable cells in total volume | 
| Substrate balance | βS (Glc, Lac) | mol | Difference in total moles in volume | 
| Yield on substrate | Yβ/β | cellsΒ·molβ»ΒΉ | βX / βS | 
| Specific rate | qβ | pmolΒ·cellβ»ΒΉΒ·hβ»ΒΉ | βS normalized to IVCD and converted to pmol | 
For example, specific consumption of glucose (q_Glc):
q_Glc = (βGlucose in mol Γ 1e12) / IVCD  β  pmol/(cellΒ·h)
All rates are computed using volume-normalized quantities for full mass balance integrity.
All calculations are performed per biological replicate (Clone Γ Rep), using volume-normalized data to maintain mass balance integrity.
Where:
- 
$$X_1$$ ,$$X_2$$ are viable cell densities at times$$t_1$$ and$$t_2$$  - Units: cells/mL and hours
 - Result: 
$$\mu$$ in$$h^{-1}$$  
The integral of viable cell density over time is estimated using the trapezoidal rule:
To convert to a total IVCD accounting for culture volume:
Where:
- Xβ, Xβ: viable cell densities at tβ and tβ
 - Units: cellsΒ·hΒ·mLβ»ΒΉ for IVCDββ; cellsΒ·h for IVCDβββ
 
- 
$$X$$ : cells/mL - 
$$S$$ : mol/mL - 
$$V$$ : mL 
- Units: cells/mol
 
- 
$$\Delta S$$ : mol - 
$$IVCD_{tot}$$ : cellΒ·h - 
$$q_S$$ : pmol/(cellΒ·h) 
π For a detailed explanation, see the How does Clonalyzer do the calculations.pdf
All rates are computed using volume-normalized quantities for full mass balance integrity. π For a detailed explanation of how kinetic and stoichiometric parameters are calculated, see the How does Clonalyzer do the calculations.pdf document included in this repository.
Clonalyzer expects a single CSV file in data/data.csv with the first row reserved for metadata (it will be skipped automatically).
| Column name | Description | Units | 
|---|---|---|
t_hr | 
Time since inoculation | hours | 
Clone | 
Clone identifier (e.g., A, B, C) | string | 
Rep | 
Biological replicate number | integer (1, 2, 3) | 
VCD | 
Viable cell density | cells/mL | 
Viab_pct | 
Cell viability plot | % | 
Vol_mL | 
Culture volume at sampling time | mL | 
Glc_g_L | 
Glucose concentration | g/L | 
Lac_g_L | 
Lactate concentration | g/L | 
Gln_mM | 
Glutamine concentration | mmol/L (mM) | 
Glu_mM | 
Glutamate concentration | mmol/L (mM) | 
is_post_feed | 
Whether the sample is post-feeding | TRUE or FALSE | 
| Column name | Example usage | Units | 
|---|---|---|
GFP_mean, TMRM_mean | 
Cytometry signal (GFP, mitochondrial potential) | arbitrary units | 
Columns such as
Notes,Glucose_Added_mL, orQuadrantsare ignored, but can coexist in your file.
| t_hr | t_day | Clone | Rep | Timestamp | Date | is_post_feed | VCD | DCD | Viab_pct | Glc_g_L | Lac_g_L | 
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | A | 1 | 10:00 | 03/07/2025 | FALSE | 3.10E+05 | 4.00E+03 | 98.73 | 6.59 | 0.00 | 
| 24 | 1 | B | 1 | 10:00 | 04/07/2025 | FALSE | 5.20E+05 | 4.00E+03 | 99.22 | 5.88 | 0.44 | 
Clonalyzer is designed to gracefully handle extra columns. This allows you to include additional data such as:
- Cell size (e.g., from a Coulter counter)
 - pH, osmolarity, conductivity
 - Any signal from cytometry or online sensors
 
You may include as many additional columns as neededβthe system will ignore them unless explicitly used in plotting.
Clonalyzer/
βββ Block_1.ipynb                  # Notebook for interval-based kinetics (Clone Γ Rep Γ Time)
βββ Block_2.ipynb                  # Notebook for grouped kinetics (Clone Γ Time)
βββ Block_3.ipynb                  # Notebook for exponential-phase analysis (Clone Γ Rep)
βββ scripts/                       # Standalone Python scripts (modular components)
β   βββ interval_kinetics.py       # Interval-based kinetic calculations
β   βββ grouped_kinetics.py        # Aggregated (mean Β± SD) calculations
β   βββ exp_phase_kinetics.py      # Kinetics during exponential phase
β   βββ plot_raw.py                # Scatter plots for raw data
β   βββ plot_grouped.py            # Line plots with error bars (grouped data)
β   βββ plot_exp.py                # Bar plots (clone-level metrics)
βββ data/
β   βββ data.csv                   # Input dataset (with metadata in first row)
βββ outputs/                       # All generated CSVs and figures
β   βββ interval_kinetics.csv
β   βββ results_agg_by_clone_time.csv
β   βββ kinetics_by_clone.csv
β   βββ kinetics_by_clone_rep.csv
β   βββ figures_raw/
β   βββ figures_agg/
β   βββ figures_exp/
βββ requirements.txt              # Python dependencies
βββ README.md                     # Project documentation
βββ How does Clonalyzer do the calculations.pdf
- Clone the repository
 
git clone https://github.com/ebalderasr/Clonalyzer.git
cd Clonalyzer- Install dependencies
 
pip install -r requirements.txt- Prepare your data
 
Place your CSV file inside the data/ folder and rename it to:
data/data.csv
Clonalyzer is organized into three independent analysis blocks. Each block includes a Jupyter Notebook that executes both data processing and plotting steps in sequence. This setup ensures a streamlined, beginner-friendly experience.
Use this block to compute kinetics between each pair of consecutive time points per replicate (interval-by-interval). Ideal for detailed kinetic trajectories.
β‘οΈ To run Block 1, open and execute the notebook:
Block_1.ipynbThis notebook performs:
- Interval-based kinetic calculations (
interval_kinetics) - Per-sample scatter plots (
plot_raw) 
Output:
- CSV file: 
outputs/interval_kinetics.csv - Figures: 
outputs/figures_raw/(time trends, kinetics, correlations) 
Use this block to compute and visualize the average Β± SD of all measurements and parameters per clone at each time point.
β‘οΈ To run Block 2, open and execute the notebook:
Block_2.ipynbThis notebook performs:
- Aggregation of results (
grouped_kinetics) - Time-course plots with error bars (
plot_grouped) 
Output:
- CSV file: 
outputs/results_agg_by_clone_time.csv - Figures: 
outputs/figures_agg/(time trends, kinetics, correlations) 
Use this block to extract clone-level metrics only during exponential growth. Youβll be prompted to specify the start and end time of the exponential phase.
β‘οΈ To run Block 3, open and execute the notebook:
Block_3.ipynbThis notebook performs:
- Kinetic calculations restricted to the exponential phase (
exp_phase_kinetics) - Bar plots of clone-level performance (
plot_exp) 
Output:
- 
CSV files:
outputs/kinetics_by_clone_rep.csvoutputs/kinetics_by_clone.csv
 - 
Figures:
outputs/figures_exp/ 
Each script used in the notebooks is also available in the scripts/ folder for advanced users or integration into custom pipelines.
To use these scripts manually:
- Copy the desired script from 
scripts/to the root folder. - Ensure 
data/data.csvexists in the root-leveldata/folder. - Run the script from the root of the repository using:
 
python script_name.py
β οΈ These scripts expect relative paths likedata/data.csvandoutputs/, so they must be executed from the root folder, not from withinscripts/.
All processed files and figures are saved in the outputs/ folder.
Emiliano Balderas R.
GitHub: @ebalderasr
MIT License.