micrompn


Namemicrompn JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryMicroMPN: Software to estimate Most Probable Number (MPN) bacterial abundance from microplates.
upload_time2023-06-12 15:41:20
maintainer
docs_urlNone
author
requires_python>=3.8
licenseCC0
keywords microbiology mpn
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Python package](https://github.com/USDA-ARS-GBRU/micrompn/actions/workflows/python-package.yml/badge.svg)](https://github.com/USDA-ARS-GBRU/micrompn/actions/workflows/python-package.yml)
[![DOI](https://zenodo.org/badge/632734005.svg)](https://zenodo.org/badge/latestdoi/632734005)

# MicroMPN: Software for automating most probable number (MPN) estimates from laboratory microplates


## Authors

* Adam Rivers, United States Department of Agriculture, Agricultural Research Service
* Karla Franco Meléndez, United States Department of Agriculture, Agricultural Research Service


## About MPN

Most probable number (MPN) is a  way of estimating how many viable bacteria are in a sample. 
A series of dilutions are made with replication and the  number of  tubes  or wells with bacterial growth is recorded.
This presence/absence and dilution information is used to calculate the most probable number of bacteria in a starting sample.

With liquid handling robots and plate reader this method can be baster than conventional plate counting or 
spotting for some applications. 


With liquid handling robots and plate reader this method can be faster than conventional plate counting or 
spotting on agar for some applications. 



## About MicroMPN

This python package has a command line program processing data from a plate reader. Users provide two types of files: 
A plate layout file specified in Wellmap format and a  CSV plate reader file with columns for the plate, 
the well or row and column and the optical value used for determining growth.

Developers of Python Packages who need an MPN calculation may want to use MicroMPN's mpn estimation function.
This is to my knowledge the only python implementation of MPN estimation in the Python Package Index.
This function is derived from Martine Ferguson and John Ihrie's MPN R package:

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> .



## Installing


1. To install from Github: 

```bash
  git clone git@github.com:USDA-ARS-GBRU/micrompn.git
  cd micrompn
  pip install .
```
2. To install from PyPI:

```bash
pip install micrompn
```

## Getting Started

MicroMPN uses two types of files, a file specifying the layout of the plate and a file containing the data from the plate reader.

1. ["Wellmap"](https://wellmap.readthedocs.io/en/latest/index.html)

- A Wellmap TOML format is a simple way of specifying plate layouts. The Wellmap site has extensive documentation about how to specify the layout. 
   
An example of the format is below. Features can be specifies by rows columns or blocks:

```
[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
```

Example of the above TOML layout visualized graphically with the Wellmap command wellmap.show("microplate.toml")

![wellmap replicate](https://github.com/USDA-ARS-GBRU/micrompn/assets/68250738/59f471f0-74e5-44f3-9518-4b287d439745)

![wellmap dilution](https://github.com/USDA-ARS-GBRU/micrompn/assets/68250738/5a1d4203-f26e-46af-8d8c-24580c84e699)


2. Plate reader CSV files

- Plate reader data files vary by instrument but most allow the output of data in tabular format.

- The named columns needed in a CSV are:

    * a plate column
    * a well column OR plate column AND plate row columns
    * an optical value column used for the determination of growth

```
plate_unique, plate_id, plate_well, rfu
plate_0, RFP_1_plate_1_shaking, A1, 27.081
plate_0, RFP_1_plate_1_shaking, A2, 22.001
plate_0, RFP_1_plate_1_shaking, A3, 12.949
plate_0, RFP_1_plate_1_shaking, A4, 10.328
plate_0, RFP_1_plate_1_shaking, A5, 9.264
plate_0, RFP_1_plate_1_shaking, A6, 10.017
plate_0, RFP_1_plate_1_shaking, A7, 9.373
plate_0, RFP_1_plate_1_shaking, A8, 9.049
plate_0, RFP_1_plate_1_shaking, A9, 3.78

```

- The names of these columns are specified in the command-line input "micrompn".

- After running MicroMPN the user will be provided with a CSV containing MPN estimates for each plate and sample

```
plate sample           mpn           mpn_adj         upper         lower
0    plate_0      0  1.005445e+08  9.220112e+07  2.295985e+08  2.295985e+08
1    plate_1      1  1.124383e+08  1.029753e+08  2.609546e+08  2.609546e+08
2    plate_2      2  3.388299e+07  2.797877e+07  6.811641e+07  6.811641e+07
3    plate_3      3  7.636579e+06  6.877494e+06  1.828966e+07  1.828966e+07
4    plate_4      4  7.515884e+05  6.752848e+05  1.195778e+06  1.195778e+06
5    plate_5      5  1.032498e+04  9.468444e+03  1.668272e+04  1.668272e+04
```

- The output contains the MPN, an MPN value corrected for bias due to the number of tubes used and the concentration and an upper and lower bound of the estimate. MicroMPN uses the 95% confidence bound estimation form Jarvis et al. 2010.

Jarvis B, Wilrich C, Wilrich P-T (2010). "Reconsideration of the derivation of Most Probable Numbers, 
their standard deviations, confidence bounds and rarity values." Journal of Applied Microbiology, 1
09, 1660-1667. <https://doi.org/10.1111/j.1365-2672.2010.04792.x>

## Usage

```
MicroMPN: Software to estimate Most Probable Number (MPN) bacterial abundance from
microplates

options:
  -h, --help            show this help message and exit
  --wellmap WELLMAP     A TOML file with plate layout specified in wellmap format
  --data DATA           A csv file or a directory containing csv files with the plate
                        name, optical value, and well or row and column data
  --cutoff CUTOFF       The value from the plate reader above which a well is
                        classified as positive
  --outfile OUTFILE     The file path and name for the results
  --plate_name PLATE_NAME
                        The name of the column containing the plate identifier in the
                        data file
  --value_name VALUE_NAME
                        The name of the column containing the optical signal column
                        in the data file
  --well_name WELL_NAME
                        The name of the column containing the well identifier in the
                        data file
  --col_name COL_NAME   The name of the column containing the plate column identifier
                        in the data file
  --row_name ROW_NAME   The name of the column containing the plate row identifier in
                        the data file
  --zero_padded         If present, the well value in the data file is treated as
                        zero-padded, e.g. A01
  --trim_positives      If present, the list of positive wells will be trimmed to the
                        most dilute all positive dilution and the least dilute all
                        negative dilution. This helps if early dilutions have improbable
                        wells.
  --version, -v         show program's version number and exit
  --logfile LOGFILE, -l LOGFILE
```

The command line options are listed above.

## Example


```bash
micrompn --wellmap micrompn/data/example1_mapfile.toml \
         --data micrompn/data/example1_plate_data.csv \
         --well_name plate_well \
         --plate_name plate_unique \
         --outfile test-output-cutoff6-trimmed.csv \
         --trim_positive \
         --cutoff 6
```



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "micrompn",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "microbiology,mpn",
    "author": "",
    "author_email": "\"Adam R. Rivers\" <adam.rivers@usda.gov>",
    "download_url": "https://files.pythonhosted.org/packages/81/95/3d24d161c26b11f05b1e72486dec5b0045663ecc07a4eeac27d3bfc2ef05/micrompn-1.0.1.tar.gz",
    "platform": null,
    "description": "[![Python package](https://github.com/USDA-ARS-GBRU/micrompn/actions/workflows/python-package.yml/badge.svg)](https://github.com/USDA-ARS-GBRU/micrompn/actions/workflows/python-package.yml)\n[![DOI](https://zenodo.org/badge/632734005.svg)](https://zenodo.org/badge/latestdoi/632734005)\n\n# MicroMPN: Software for automating most probable number (MPN) estimates from laboratory microplates\n\n\n## Authors\n\n* Adam Rivers, United States Department of Agriculture, Agricultural Research Service\n* Karla Franco Mel\u00e9ndez, United States Department of Agriculture, Agricultural Research Service\n\n\n## About MPN\n\nMost probable number (MPN) is a  way of estimating how many viable bacteria are in a sample. \nA series of dilutions are made with replication and the  number of  tubes  or wells with bacterial growth is recorded.\nThis presence/absence and dilution information is used to calculate the most probable number of bacteria in a starting sample.\n\nWith liquid handling robots and plate reader this method can be baster than conventional plate counting or \nspotting for some applications. \n\n\nWith liquid handling robots and plate reader this method can be faster than conventional plate counting or \nspotting on agar for some applications. \n\n\n\n## About MicroMPN\n\nThis python package has a command line program processing data from a plate reader. Users provide two types of files: \nA plate layout file specified in Wellmap format and a  CSV plate reader file with columns for the plate, \nthe well or row and column and the optical value used for determining growth.\n\nDevelopers of Python Packages who need an MPN calculation may want to use MicroMPN's mpn estimation function.\nThis is to my knowledge the only python implementation of MPN estimation in the Python Package Index.\nThis function is derived from Martine Ferguson and John Ihrie's MPN R package:\n\nMartine Ferguson and John Ihrie. (2019). MPN: Most Probable Number and \nOther Microbial Enumeration Techniques. R package version 0.3.0. <https://CRAN.R-project.org/package=MPN> .\n\n\n\n## Installing\n\n\n1. To install from Github: \n\n```bash\n  git clone git@github.com:USDA-ARS-GBRU/micrompn.git\n  cd micrompn\n  pip install .\n```\n2. To install from PyPI:\n\n```bash\npip install micrompn\n```\n\n## Getting Started\n\nMicroMPN uses two types of files, a file specifying the layout of the plate and a file containing the data from the plate reader.\n\n1. [\"Wellmap\"](https://wellmap.readthedocs.io/en/latest/index.html)\n\n- A Wellmap TOML format is a simple way of specifying plate layouts. The Wellmap site has extensive documentation about how to specify the layout. \n   \nAn example of the format is below. Features can be specifies by rows columns or blocks:\n\n```\n[col]\n1.dilution = 1e00\n2.dilution = 1e-01\n3.dilution = 1e-02\n4.dilution = 1e-03\n5.dilution = 1e-04\n6.dilution = 1e-05\n7.dilution = 1e-06\n8.dilution = 1e-07\n9.dilution = 1e-08\n10.dilution = 1e-09\n11.dilution = 1e-10\n12.dilution = 1e-11\n\n[row]\nA.replicate = 1\nB.replicate = 2\nC.replicate = 3\nD.replicate = 4\nE.replicate = 5\nF.replicate = 6\nG.replicate = 7\nH.replicate = 8\n[block.12x8.'A1']\nsample = 1\n```\n\nExample of the above TOML layout visualized graphically with the Wellmap command wellmap.show(\"microplate.toml\")\n\n![wellmap replicate](https://github.com/USDA-ARS-GBRU/micrompn/assets/68250738/59f471f0-74e5-44f3-9518-4b287d439745)\n\n![wellmap dilution](https://github.com/USDA-ARS-GBRU/micrompn/assets/68250738/5a1d4203-f26e-46af-8d8c-24580c84e699)\n\n\n2. Plate reader CSV files\n\n- Plate reader data files vary by instrument but most allow the output of data in tabular format.\n\n- The named columns needed in a CSV are:\n\n    * a plate column\n    * a well column OR plate column AND plate row columns\n    * an optical value column used for the determination of growth\n\n```\nplate_unique, plate_id, plate_well, rfu\nplate_0, RFP_1_plate_1_shaking, A1, 27.081\nplate_0, RFP_1_plate_1_shaking, A2, 22.001\nplate_0, RFP_1_plate_1_shaking, A3, 12.949\nplate_0, RFP_1_plate_1_shaking, A4, 10.328\nplate_0, RFP_1_plate_1_shaking, A5, 9.264\nplate_0, RFP_1_plate_1_shaking, A6, 10.017\nplate_0, RFP_1_plate_1_shaking, A7, 9.373\nplate_0, RFP_1_plate_1_shaking, A8, 9.049\nplate_0, RFP_1_plate_1_shaking, A9, 3.78\n\n```\n\n- The names of these columns are specified in the command-line input \"micrompn\".\n\n- After running MicroMPN the user will be provided with a CSV containing MPN estimates for each plate and sample\n\n```\nplate sample           mpn           mpn_adj         upper         lower\n0    plate_0      0  1.005445e+08  9.220112e+07  2.295985e+08  2.295985e+08\n1    plate_1      1  1.124383e+08  1.029753e+08  2.609546e+08  2.609546e+08\n2    plate_2      2  3.388299e+07  2.797877e+07  6.811641e+07  6.811641e+07\n3    plate_3      3  7.636579e+06  6.877494e+06  1.828966e+07  1.828966e+07\n4    plate_4      4  7.515884e+05  6.752848e+05  1.195778e+06  1.195778e+06\n5    plate_5      5  1.032498e+04  9.468444e+03  1.668272e+04  1.668272e+04\n```\n\n- The output contains the MPN, an MPN value corrected for bias due to the number of tubes used and the concentration and an upper and lower bound of the estimate. MicroMPN uses the 95% confidence bound estimation form Jarvis et al. 2010.\n\nJarvis B, Wilrich C, Wilrich P-T (2010). \"Reconsideration of the derivation of Most Probable Numbers, \ntheir standard deviations, confidence bounds and rarity values.\" Journal of Applied Microbiology, 1\n09, 1660-1667. <https://doi.org/10.1111/j.1365-2672.2010.04792.x>\n\n## Usage\n\n```\nMicroMPN: Software to estimate Most Probable Number (MPN) bacterial abundance from\nmicroplates\n\noptions:\n  -h, --help            show this help message and exit\n  --wellmap WELLMAP     A TOML file with plate layout specified in wellmap format\n  --data DATA           A csv file or a directory containing csv files with the plate\n                        name, optical value, and well or row and column data\n  --cutoff CUTOFF       The value from the plate reader above which a well is\n                        classified as positive\n  --outfile OUTFILE     The file path and name for the results\n  --plate_name PLATE_NAME\n                        The name of the column containing the plate identifier in the\n                        data file\n  --value_name VALUE_NAME\n                        The name of the column containing the optical signal column\n                        in the data file\n  --well_name WELL_NAME\n                        The name of the column containing the well identifier in the\n                        data file\n  --col_name COL_NAME   The name of the column containing the plate column identifier\n                        in the data file\n  --row_name ROW_NAME   The name of the column containing the plate row identifier in\n                        the data file\n  --zero_padded         If present, the well value in the data file is treated as\n                        zero-padded, e.g. A01\n  --trim_positives      If present, the list of positive wells will be trimmed to the\n                        most dilute all positive dilution and the least dilute all\n                        negative dilution. This helps if early dilutions have improbable\n                        wells.\n  --version, -v         show program's version number and exit\n  --logfile LOGFILE, -l LOGFILE\n```\n\nThe command line options are listed above.\n\n## Example\n\n\n```bash\nmicrompn --wellmap micrompn/data/example1_mapfile.toml \\\n         --data micrompn/data/example1_plate_data.csv \\\n         --well_name plate_well \\\n         --plate_name plate_unique \\\n         --outfile test-output-cutoff6-trimmed.csv \\\n         --trim_positive \\\n         --cutoff 6\n```\n\n\n",
    "bugtrack_url": null,
    "license": "CC0",
    "summary": "MicroMPN: Software to estimate Most Probable Number (MPN) bacterial abundance from microplates.",
    "version": "1.0.1",
    "project_urls": null,
    "split_keywords": [
        "microbiology",
        "mpn"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f66093acc2d68abdc20e58525f0bfed96cc4d6b8de2569964fadc1ddc7a243e3",
                "md5": "c15788b183a1ec32729a583b192966d5",
                "sha256": "23df5b8260aa3b1a6525fe5fd53d1b8408bd6909b9d8179f7932a4bbe5df8c9d"
            },
            "downloads": -1,
            "filename": "micrompn-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c15788b183a1ec32729a583b192966d5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 46082,
            "upload_time": "2023-06-12T15:41:18",
            "upload_time_iso_8601": "2023-06-12T15:41:18.735648Z",
            "url": "https://files.pythonhosted.org/packages/f6/60/93acc2d68abdc20e58525f0bfed96cc4d6b8de2569964fadc1ddc7a243e3/micrompn-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "81953d24d161c26b11f05b1e72486dec5b0045663ecc07a4eeac27d3bfc2ef05",
                "md5": "a53158f0e3a0246f3082ee708f8cc5c1",
                "sha256": "03175b69ce93ad40b8a60384a375effa9876ac7e7a698148c8b2da3c93aa7cac"
            },
            "downloads": -1,
            "filename": "micrompn-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a53158f0e3a0246f3082ee708f8cc5c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 50370,
            "upload_time": "2023-06-12T15:41:20",
            "upload_time_iso_8601": "2023-06-12T15:41:20.740287Z",
            "url": "https://files.pythonhosted.org/packages/81/95/3d24d161c26b11f05b1e72486dec5b0045663ecc07a4eeac27d3bfc2ef05/micrompn-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-12 15:41:20",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "micrompn"
}
        
Elapsed time: 0.07524s