om_code.getfitnesspenalty.getfitnesspenalty#

getfitnesspenalty(self, ref, com, y='gr', abs=False, figs=True, nosamples=100, norm=False)[source]#

Calculates - as a measure of fitness - the area between typically two growth rate versus OD curves, normalized by the length along the OD-axis where they overlap.

Parameters
ref: list of strings

For only a single experiment, a list of two strings. The first string specifies the condition and the second specifies the strain to be used for the reference to which fitness is to be calculated. With multiple experiments, a list of three strings. The first string specifies the experiment, the second specifies the condition, and the third specifies the strain.

com: list of strings

For only a single experiment, a list of two strings. The first string specifies the condition and the second specifies the strain to be compared with the reference. With multiple experiments, a list of three strings. The first string specifies the experiment, the second specifies the condition, and the third specifies the strain.

y: string, optional

The variable to be compared.

figs: boolean, optional

If True, a plot of the area between the two growth rate versus OD curves is shown.

nosamples: integer

The number bootstraps used to estimate the error.

norm: boolean

If True, returns the mean and variance of the area under the reference strain for normalisation.

Returns
fp: float

The area between the two curves.

err: float

An estimate of the error in the calculated error, found by bootstrapping.

reffp: float, optional

The area beneath the reference strain.

referr: float, optional

An estimate of the erroe in the calculated area for the reference strain.