Jul 28, 2023

Public workspaceMicroMPN: Software for Automating Most Probable Number Estimates from Laboratory Microplates

  • 1United States Department of Agriculture, Agricultural Research Service;
  • 2USDA-ARS Genomics and Bioinformatics Research Unit
Icon indicating open access to content
QR code linking to this content
Protocol CitationAdam R Rivers, Karla Franco Meléndez 2023. MicroMPN: Software for Automating Most Probable Number Estimates from Laboratory Microplates. protocols.io https://dx.doi.org/10.17504/protocols.io.81wgbymenvpk/v1
Manuscript citation:

License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working.
Created: June 02, 2023
Last Modified: May 14, 2024
Protocol Integer ID: 82833
Keywords: software, Jupyter Notebook, MicroMPN, MPN, most probable number, microplates, Genomics and Bioinformatics Research Unit, NP301, microbes, microorganisms, viability, cell count estimation, microtiter plates, CRIS 6066-21310-005-00-D
Funders Acknowledgement:
USDA-ARS
Grant ID: 6066-21310-005-00-D
Plant Genetic Resources, Genomics and Genetic Improvement
Grant ID: NP301
Disclaimer
The mention of trade names or commercial products on this project is solely for the purpose of providing specific information and neither implies recommendation nor endorsement by the USDA.

Abstract
We developed a command-line Python package named "MicroMPN" to enable the automation of most probable number (MPN) value estimations from microplates of different formats and sample designs. In this protocol, we guide users on how to run MicroMPN from a Jupyter Notebook using simulated fluorescence data values. To run MicroMPN, the users must input two data files. Input file 1: the user provides a CSV file with the plate name, the well locations of each sample in a microplate, and the spectrofluorometric data. Input file 2: the user specifies the layout of a microplate with a Wellmap TOML-based format file. The second file contains the number of replicates, the dilution series, and the number of samples per plate. The Python package “wellmap” parses the information of a microplate from the TOML formatted file for downstream calculation of an MPN value. Additionally, users must specify a cutoff/threshold value, which is used to determine which wells are positive or negative for microbial growth. Output file: MicroMPN will calculate an MPN value, a bias-corrected MPN value, 95% confidence intervals, and a rarity index.
Guidelines
  • The most probable number (MPN) assay is a culture-dependent method of quantification most commonly used to enumerate microbes from environmental samples 1. In the MPN assay, the density of viable microbes is determined by serially diluting to extinction in a culture medium. An MPN count (MPN/mL or MPN/g) is therefore based on the presence or absence of a measurable signal, such as media turbidity 2, color change 3,4, and luminescence 5-10. MPN calculations require two fixed quantities: sample volume and number of replicates at each dilution step. Calculations of an MPN value are based on probability theory and not on an absolute count 11. A Poisson distribution is used to evaluate the likelihood of microbes being transferred (or not) in a dilution step, based on the inoculum concentration. Given the probability of a transfer occurring, a binomial distribution is then used to evaluate the likelihood of observing a specific number of positive replicates in a dilution step 11. The initial concentration that maximizes the combined likelihood of all dilution steps is the most probable number of microbes in the sample.
  • A portion of the code used in MicroMPN was derived from the “MPN” R package created by Ferguson and Ihrie (2019) 16.


  • Additionally, users can use the R package "MPN" (written by the same authors that created MPNCalc), whose code we transpiled to Python to run MicroMPN from the terminal.
Materials
A computer, internet access, and software MicroMPN.
Before start
In this protocol we cover how to run MicroMPN from a Jupyter Notebook.


However, users that choose to run the package from a terminal can access MicroMPN through:


Github:

git clone git@github.com:USDA-ARS-GBRU/micrompn.git
cd micrompn
pip install .


PyPI:

pip install micrompn

docker:

docker pull ghcr.io/usda-ars-gbru/micrompn:main


Example of Input file 1: namefile.csv
Example of Input file 1: namefile.csv
To run MicroMPN, users need an input CSV file with RFU data.

The column headers must include the following identifiers:
plate_unique
plate_well
rfu

*Additional column names in the input file will be ignored by MicroMPN.

As an example of a CSV file with relative fluorescence units (RFU) data, we provide users with Download input_protocols_io.csvinput_protocols_io.csv . The input file provided contains RFU data in a 12 (dilution series) by 8 (replicates) microplate layout. In this microplate, column 1 has 8 replicates of resuspended soil sample. Columns 2 - 12, contain 10-fold serially diluted samples. Values correspond to spectrofluorometric measurements collected 48 h after incubating the plate.


Example of Input file 2: namefile.toml (namefile.txt)
Example of Input file 2: namefile.toml (namefile.txt)
To run MicroMPN, users need a second input file which specifies the layout of samples across a microplate. A Wellmap file can be created using a text editor (e.g., notepad). The format of the file is TOML-based.

[col] 1.dilution = 1e00 2.dilution = 1e-01 3.dilution = 1e-02 4.dilution = 1e-03 5.dilution = 1e-04 6.dilution = 1e-05 7.dilution = 1e-06 8.dilution = 1e-07 9.dilution = 1e-08 10.dilution = 1e-09 11.dilution = 1e-10 12.dilution = 1e-11

[row] A.replicate = 1 B.replicate = 2 C.replicate = 3 D.replicate = 4 E.replicate = 5 F.replicate = 6 G.replicate = 7 H.replicate = 8

[block.12x8.‘A1’] sample = 1


In this .toml file Download microplate.tomlmicroplate.toml , each row (A – H) was assigned a replicate value (1 – 8), while each column (1 – 12) represented a particular dilution factor (1e00 – 1e-11). For this reason, each plate was divided into a single 12x8 sample block, although multiple sample blocks on a plate are possible. A .toml file can be opened with a text editor (e.g., notepad).


Example of how to run MicroMPN from a Jupyter Notebook
Example of how to run MicroMPN from a Jupyter Notebook
Step-by-step example on how to run the command-line tool MicroMPN from a Jupyter Notebook.

* To run micrompn from a Jupyter Notebook use the symbol "!" before micrompn; micrompn was designed to run from the command-line not from a Jupyter Notebook.

* For ease of documentation and a user-friendly interface, we used Jupyter Notebooks for MPN calculations. For more information on Jupyter Notebooks users are referred to (Jupyter Project Documentation).

*For information on how to install packages in a Jupyter Notebook visit Installing Python Packages from a Jupyter Notebook.
Outside of a notebook, clone or download the MicroMPN repository from GitHub (https://github.com/USDA-ARS-GBRU/micrompn). Extract files locally.



Launch a Jupyter Notebook from the Jupyter terminal or directly from the Anaconda Navigator.

Once it launches, your project directory will be displayed in your browser. Make sure the data files needed to run MicroMPN are in your project directory. Then create a new Python notebook in the same directory were all your files are located.
# In a Jupyter Notebook code cell, install MicroMPN by running the following line of code:

! pip install C:\Users\location_of_extracted_files\micrompn-main\micrompn-main

* In our case, "! pip install" worked because both the shell terminal and kernel are using the same python executable. However, this is not always the case. This is explained in detail in Installing Python Packages from a Jupyter Notebook.

# Ignore this command when re-using the notebook.

# Alternatively, users can install MicroMPN with the following lines of code:

import sys
print(sys.executable)

# Copy the output from "sys.executable", which should be the path to the Python executable active in the kernel.

# In a new code cell, run:
! {sys.executable output} -m pip install C:\Users\location_of_extracted_files\micrompn-main\micrompn-main
# In a new code cell, import "micrompn" into the notebook.

import micrompn

# Check proper installation by running:
! micrompn --help

# If installation was successful, user should see the following output:

# To visualize the .toml or .txt file, run the following commands to first install "wellmap" and then import "wellmap" into the notebook:

! pip install wellmap #Ignore this command when re-using the notebook.

import wellmap

wellmap.show(Download microplate.tomlmicroplate.toml )

The Python package "wellmap", which is a dependency of "micrompn", will parse the data from the CSV file based on the .toml or .txt specifications. For more information on how to create a TOML formatted file with different plate layouts visit wellmap- File format for 96-well plate layouts.
# In a new code cell, run "micrompn".
# CSV file name: input_protocols_io.csv
# TOML file name: microplate.toml (it could also be a .txt file)
*Make sure the .csv and .toml files are located in the same directory as your Jupyter Notebook (nameofnotebook.ipynb).
# run the following code in a single line
! micrompn --wellmap microplate.toml --data "C:\location\of\CSV\file\input_protocols_io.csv"
--cutoff 6
--outfile "C:\location\of\CSV\output\file\output_protocols_io.csv"
--plate_name "plate_unique"
--value_name "rfu"
--well_name "plate_well"
--trim_positives
Example of output file Download output_protocols_io.csvoutput_protocols_io.csv .

ABCDEFGH
platesamplempnmpn_adjupperlowerrarity
0plate_33764678568859351831757831921970.63574
In our experimental setup, ~0.44g of soil were resuspended in 1 mL of volume. Then, 0.1 ml of soil resuspension were transferred to column 1 of a microplate. Since MPN estimated values are based on the volume of a sample used at each dilution step, we must adjust the MPN estimate for the difference in volume by multiplying by 10. The original sample volume in column 1 of our microplate example was 0.1 mL, therefore the concentration of bacteria is MPN/0.1 mL. This is equivalent to a correction of 10 x MPN/1 mL. We would further normalize the MPN estimate by the average mass of soil per well in order to convert MPN/mL to MPN/g. Finally, prior to any statistical analysis, log10 transform MPN values.

Users can avoid this type of correction, if desired, by adjusting the dilution factors to account for the initial volume of soil resuspension.

Additional resources
Additional resources
We provide users with 96-wells and 384-wells microplate layouts, input files with mock RFU data, MicroMPN output files, and copies of our Jupyter Notebooks in html format.



Microplate layout: Download microplate_96_3_samples_vertical_dilutions.txtmicroplate_96_3_samples_vertical_dilutions.txt

96-well plate
3 samples
4 replicates
8 vertical dilutions

input: Download 96_3_samples_vertical_dilutions.csv96_3_samples_vertical_dilutions.csv
output: Download OUTFILE_96_3_samples_vertical_dilutions.csvOUTFILE_96_3_samples_vertical_dilutions.csv
html: Download MicroMPN_96_3_samples_Copy.htmlMicroMPN_96_3_samples_Copy.html



Microplate layout: Download microplate_96_2_samples_vertical_dilutions.txtmicroplate_96_2_samples_vertical_dilutions.txt

96-well plate
2 samples
6 replicates
8 vertical dilutions

input: Download 96_2_samples_vertical_dilutions.csv96_2_samples_vertical_dilutions.csv
output: Download OUTFILE_96_2_samples_vertical_dilutions.csvOUTFILE_96_2_samples_vertical_dilutions.csv


Microplate layout: Download microplate_96_2_samples_horizontal_dilutions.txtmicroplate_96_2_samples_horizontal_dilutions.txt

96-well plate
2 samples
4 replicates
12 horizontal dilutions

input: Download 96_2_samples_horizontal_dilutions.csv96_2_samples_horizontal_dilutions.csv
output: Download OUTFILE_96_2_samples_horizontal_dilutions.csvOUTFILE_96_2_samples_horizontal_dilutions.csv



html: Download MicroMPN_96_2_samples_Copy.htmlMicroMPN_96_2_samples_Copy.html

Microplate layout: Download microplate_384_4_samples_horizontal_dilutions.txtmicroplate_384_4_samples_horizontal_dilutions.txt

384-well plate
4 samples
8 replicates
12 horizontal dilutions

input: Download 384_4_samples_horizontal_dilutions.csv384_4_samples_horizontal_dilutions.csv
output: Download OUTFILE_384_4_samples_horizontal_dilutions.csvOUTFILE_384_4_samples_horizontal_dilutions.csv
html: Download MicroMPN_384_4_samples_Copy.htmlMicroMPN_384_4_samples_Copy.html

Microplate layout: Download microplate_384_6_samples_vertical_dilutions.txtmicroplate_384_6_samples_vertical_dilutions.txt

384-well plate
6 samples
8 replicates
8 vertical dilutions

input: Download 384_6_samples_vertical_dilutions.csv384_6_samples_vertical_dilutions.csv
output: Download OUTFILE_384_6_samples_vertical_dilutions.csvOUTFILE_384_6_samples_vertical_dilutions.csv
html: Download MicroMPN_384_6_samples_Copy.htmlMicroMPN_384_6_samples_Copy.html

Protocol references
1. Woomer, P. L. Most Probable Number Counts. in Methods of Soil Analysis 59–79 (John Wiley & Sons, Ltd, 1994). doi:10.2136/sssabookser5.2.c5.

2. Lee J, Kim H-S, Jo HY, Kwon MJ. 2021. Revisiting soil bacterial counting methods: Optimal soil storage and pretreatment methods and comparison of culture-dependent and -independent methods. PLoS ONE 16:e0246142.

3. Haines JR, Wrenn BA, Holder EL, Strohmeier KL, Herrington RT, Venosa AD. 1996. Measurement of hydrocarbon-degrading microbial populations by a 96-well plate most-probable-number procedure. J Ind Microbiol 16:36–41.

4. Kodaka H, Mizuochi S, Saito M, Matsuoka H. 2008. Evaluation of a new medium for the enumeration of total coliforms and Escherichia coli in Japanese surface waters. J Appl Microbiol 104:1112–1118.

5. Flemming CA, Lee H, Trevors JT. 1994. Bioluminescent Most-Probable-Number Method To Enumerate lux-Marked Pseudomonas aeruginosa UG2Lr in Soil. Appl Environ Microbiol 60:3458–3461.

6. Arias RS, Mochizuki G, Fukui R, Alvarez AM. 1996. Most probable number method to enumerate a bioluminescent Xanthomonas campestris pv. campestris in soil. Soil Biol Biochem 28:1725–1728.

7. Feng PC, Hartman PA. 1982. Fluorogenic assays for immediate confirmation of Escherichia coli. Appl Environ Microbiol 43:1320–1329.

8. Carmen Balebona M, Moriñigo MA, Cornax R, Borrego JJ, Torregrossa VM, Gauthier MJ. 1990. Modified most-probable-number technique for the specific determination of Escherichia coli from environmental samples using a fluorogenic method. J Microbiol Methods 12:235–245.

9. Cassidy MB, Leung KT, Lee H, Trevors JT. 2000. A comparison of enumeration methods for culturable Pseudomonas fluorescens cells marked with green fluorescent protein. J Microbiol Methods 40:135–145.

10. Walser P e. 2000. Using Conventional Microtiter Plate Technology for the Automation of Microbiological Testing of Drinking Water. J Rapid Methods Autom Microbiol 8:193–207.

11. Jarvis B, Wilrich C, Wilrich P ‐T. 2010. Reconsideration of the derivation of Most Probable Numbers, their standard deviations, confidence bounds and rarity values. J Appl Microbiol 109:1660–1667. (MPN value calculations and 95% confidence intervals)
12. Kundert, K. Wellmap: a file format for microplate layouts. BMC Research Notes14, 164 (2021). (TOML-based format file)

13. Salama, I. A., Koch, G. G. & Tolley, D. H. On the estimation of the most probable number in a serial dilution experiment. Communications in Statistics - Theory and Methods7, 1267–1281 (1978). (bias-corrected MPN value)

14. Blodgett, R. J. Measuring Improbability of Outcomes from a Serial Dilution Test. Communications in Statistics - Theory and Methods31, 2209–2223 (2002). (MPN rarity index)

15. Blodgett, R. J. Serial dilution with a confirmation step. Food Microbiology22, 547–552 (2005). (MPN rarity index)

16. Martine Ferguson and John Ihrie. (2019). MPN: Most Probable Number and Other Microbial Enumeration Techniques. R package version 0.3.0. https://CRAN.R-project.org/package=MPN .