Skip to main content

A tool for estimating growth rates in growth curves.

Project description

https://img.shields.io/travis/biosustain/croissance/master.svg?style=flat-square https://img.shields.io/pypi/v/croissance.svg?style=flat-square https://img.shields.io/pypi/l/croissance.svg?style=flat-square https://zenodo.org/badge/70239371.svg

Description

A tool for estimating growth rates in growth curves. The tool fits λ ⋅ e μ⋅x + N 0 to any candidate growth phases of the growth curve that have increasing growth, i.e. where both the first and second derivative of the growth function are positive. To identify these phases reliably, the tool utilizes a custom smoothing function that addresses problems other smoothing methods have with growth curves that have regions with varying levels of noise (e.g. lots of noise in the beginning, then less noise after growth starts, then more noise in the stationary phase).

The parameter N 0 represents the background/blank OD reading (not seeding OD) and can optionally be constrained. This is recommended if the value is known.

The growth rate in calculated growth phases can only be properly compared if their seeding OD (when the organism is at its initial population) points to a similar stage of actual growth.

Intercept (λ) reported by this package can be used as indicator of lag if SNR is sufficiently high.

Installation

To install croissance, use Python 3.x pip:

pip3 install croissance

Usage

Croissance can be used from command-line or as a Python library. The input to the command-line tool is generally one or more *.tsv files (tab-separated values) with the following format:

time

A1

A2

0.0

0.0

0.01

0.17

0.14

0.06

Each sample should be recorded in its own column with the sample name in the header row. The time unit is hours and the value unit should be OD or some value correlating with OD.

To process this file, enter:

croissance example.tsv

The output will be generated at example.output.tsv. The output is formatted with column headers: name (sample name), phase (nth growth phase), start (start time), end (end time), slope (μ), intercept (λ), n0 (N 0) and a few others. By default, each sample is represented by at least one row, containing phase “0”. This is simply the highest ranking phase if one was found for this curve; otherwise the remaining columns are empty.


To also output a PDF files with figures (example.output.pdf), enter:

croissance --figures example.tsv
https://cloud.githubusercontent.com/assets/74085/21225960/abfa9a4a-c2d3-11e6-85c6-88b1db24723c.png

To see a description of all the command-line options available, enter croissance --help.

For use from Python, provide your growth curve as a pandas.Series object. The growth rates are estimated using croissance.process_curve(curve). The return value is a namedtuple object with attributes series, outliers and growth_phases . Each growth phase has the attributes start (start time), end (end time), slope (μ), intercept (λ), n0 (N 0), as well as other attributes such as SNR (signal-to-noise ratio of the fit) and rank.

from croissance import process_curve

result = process_curve(my_curve)
print(result.growth_phases)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

croissance-1.2.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

croissance-1.2.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file croissance-1.2.0.tar.gz.

File metadata

  • Download URL: croissance-1.2.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for croissance-1.2.0.tar.gz
Algorithm Hash digest
SHA256 17cfd03a9dd80c1c2aaa1414e2684cb6fbff3ee942565f9eb3b131b019fc1a3b
MD5 09305b7ae430383b3441b8adab314f78
BLAKE2b-256 7203832529ea77643f4082eb35cf3778834005c96deb9c594061563d0f02f971

See more details on using hashes here.

File details

Details for the file croissance-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: croissance-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for croissance-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b24a6a022ae1fe09b34df93b29963160c89292da895af4b890ab0fe7eb31c69b
MD5 2ccc4a7a291b925eec6e98057357d397
BLAKE2b-256 cc49337b19a3185fc9735a9bbb15fc1559533e4d0159289c73e4b4e217a0b54f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page