Skip to content

wl5e/serial-dilution-scheme-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serial Dilution Scheme Generator

A command-line tool for designing serial dilution series used in broth microdilution, MIC panels, and other microbiological assays. Provides manual step mode, automatic calculation to a target concentration, and outputs table, CSV, JSON, or an ASCII plot.

Features

  • Manual mode: specify the number of steps and generate a full dilution scheme.
  • Automatic mode: provide a target end concentration and the tool computes the required number of steps.
  • Flexible volume input: define transfer volume and total volume, or a custom dilution factor.
  • Multiple output formats: human-readable table, CSV, JSON, and an ASCII bar chart of concentrations.
  • GMP-friendly: strict input validation, clear error messages, consistent units handling.
  • No external dependencies — runs with Python 3.8+.

Installation

git clone https://github.com/your-username/serial-dilution-scheme-generator.git
cd serial-dilution-scheme-generator

The tool is a Python package. Run it directly with python -m dilugen.

Usage

Basic manual dilution (5 steps, 2-fold dilution)

python -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --steps 5 --units mL

Automatic calculation to reach a target concentration

python -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --target-conc 0.01 --units µL

Using a dilution factor instead of volumes

python -m dilugen --stock 1000 --factor 2 --v-total 1.0 --steps 4 --units mL

Output as CSV

python -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --steps 8 --output csv > dilution_scheme.csv

ASCII plot of log concentration

python -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --steps 8 --output plot

Examples

Table output:

 Step |   Concentration | Vol Added (prev) |    Vol Diluent |  Total Vol
----------------------------------------------------------------------
   1 |             640 |          0.5 mL  |       0.5 mL   |    1.0 mL
   2 |             320 |          0.5 mL  |       0.5 mL   |    1.0 mL
   3 |             160 |          0.5 mL  |       0.5 mL   |    1.0 mL
   4 |              80 |          0.5 mL  |       0.5 mL   |    1.0 mL

Total stock volume required: 0.5 mL
Total diluent volume required: 2.0 mL

Plot output:

Step  1 (640)            | ##################
Step  2 (320)            | #################
Step  3 (160)            | ################
Step  4 (80)             | ###############
Step  5 (40)             | ##############
Step  6 (20)             | #############
Step  7 (10)             | ############
Step  8 (5)              | ###########

License

MIT License. See LICENSE.

About

A GMP-friendly CLI tool to generate serial dilution schemes for microplate assays, with manual steps or automatic target-concentration calculation and multiple output formats.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages