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.
- 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+.
git clone https://github.com/your-username/serial-dilution-scheme-generator.git
cd serial-dilution-scheme-generatorThe tool is a Python package. Run it directly with python -m dilugen.
python -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --steps 5 --units mLpython -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --target-conc 0.01 --units µLpython -m dilugen --stock 1000 --factor 2 --v-total 1.0 --steps 4 --units mLpython -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --steps 8 --output csv > dilution_scheme.csvpython -m dilugen --stock 1280 --v-transfer 0.5 --v-total 1.0 --steps 8 --output plotTable 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) | ###########
MIT License. See LICENSE.