GrowthRatesPy: Python API for GrotwhRates

Author: Yoav Ram

GrowthRates is a program for analysis of growth curve data: “GrowthRates uses the output from microbial growth rate experiments that are done using microtiter plate readers to caculate the best-fit growth rates, the lag times and the maximum OD”.

GrowthRatesPy provides a Python API for using GrowthRates from within Python code.

Install

To install the latest stable version of GrowthRatesPy, use pip:

>>> pip install git+https://github.com/yoavram/GrowthRatesPy.git

You will need to install pandas, which requires NumPy etc. This is most easily done on Windows using Anaconda .

You will also need to download GrowthRates and unzip it to either C:\Program Files, C:\Program Files (x86) or to anywhere else of your choice, provided that you add it to your PATH.

GrowthRatesPy supports both Python 2 and 3 and was tested with Python 2.7 and 3.4.

Usage

To use GrowthRatesPy you’ll need a TSV (tab-separated values) file in the format specified in GrowthRates documentation: one time column, in minutes, called Min, and one or more columns of OD data (usually one column per well).

You can use the file supplied with the package, called Tecan_210115.tsv, which will be located in your Python package library (search is your friend).

>>> from growthratespy import growthrates
>>> summary = growthrates(infile='Tecan_210115.tsv', well=96)

Here, well is the number of the well that has the blank sample.

The result, summary, is a table of type pandas.DataFrame that contains the results of the analysis:

Well Rate R Max OD lag time (minutes)
A1 0.02926 0.99487 0.515 1.1
A2 0.13469 0.92693 0.525 58.0
A3 0.01350 0.89919 0.529 36.8
A4 0.03109 0.99670 0.457 42.3
A5 0.01164 0.99983 0.439 61.6
A6 0.01273 0.99985 0.520 54.9
A7 0.01613 0.99987 0.529 34.4
A8 0.01485 0.99980 0.509 31.8

If the data is in a pandas.DataFrame called df rather than a file, you can give this dataframe directly to the growthrates function:

>>> summary = growthrates(data=df, well=96)

Support

Please report bugs and file feature requests by opening an issue on github.

Citation

If you use GrowthRates, please cite:

Note

Hall, B. G., H. Acar and M. Barlow. 2014 Growth Rates Made Easy. Mol. Biol. Evol. 31: 232-238 doi:10.1093/molbev/mst197

License

GrowthRatesPy is not related to GrowthRates and is independently developed.

GrowthRatesPy source code is licensed under the terms of the MIT license.

GrowthRatesPy documentation and other content is licensed under the terms of the Attribution 4.0 International (CC BY 4.0) license.

GrowthRates is distributed under a separate license, please see the PDF attached to the program.

API

growthratespy.core.find_growthrates()[source]

Attempts to find GrowthRates.

Tries to use shutil.which or distutils.spawn.find_executable, otherwise tries to find it in Program Files folder.

Returns:

str

Path to GrowthRates; raises ValueError if couldn’t find.

growthratespy.core.growthrates(infile=None, data=None, blank_well=None)[source]

Runs GrowthRates on input file with blank given well.

Parameters:

infile : str

path to data file.

data : pd.DataFrame

Data to used instead of infile.

blank_well : int

well number for background OD.

Returns:

pandas.DataFrame

Table of GrowthRates results.

growthratespy.core.read_results(results_filename)[source]

Loads a GrowthRates results file.

Parameters:

results_filename : str

path to results file.

Returns:

pandas.DataFrame

Table of GrowthRates results.

growthratespy.core.read_summary(summary_filename)[source]

Loads a GrowthRates summary file.

Parameters:

summary_filename : str

path to summary file.

Returns:

pandas.DataFrame

Table of GrowthRates summary.