Skip to main content

Fermy is a toolkit to empower fermentation data analysis from Pandas DataFrame.

Project description

https://gitlab.com/Shinuginn/pymage/-/raw/main/fermylogosmall.png

Fermy is a toolkit to empower fermentation data analysis independent of any SCADA. Input data have to be converted in Python Pandas DataFrame with datetime or deltatime converted into float as index. Fermy is composed of two sub-modules:

  • pandasfermy add to Pandas methods to compute analysis on fermentation data with growth rate and lagtime calculation e.g. DataFrame.fermgrowth()

  • plotlyfermy add to Pandas methods to plot fermentation data with dedicated kinds of charts like Control Chart or Multi-Yaxis Chart e.g. DataFrame.ccplot().

Fermy also includes drivers for laboratory devices like scales (Sartorius Entris or Entris II) and peristaltic pumps (Watson Marlow pump 120U connect to a computer through a Labjack T7) as new classes: PompWatMarlo & BalanceEntris. To acces to those drivers just make “import fermy.driverslabtool” and then “fermy.driverslabtool.pump.<ClassName>” or “fermy.driverslabtool.scale.<ClassName>”.

The project is hosted on https://gitlab.com/

To install it, please simply used “pip install fermy”

To use it, please simply make:

import fermy

and then use them as any other methods of Pandas:

DataFrame.<methodname>()

Methods from pandasfermy

  • fermgrowth: Function to compute maximal growth rate and lagtime. It is based on a mix of two algorithms describes in Toussaint et al. 2006 and Hall et al. 2014.
    • Input: A DataFrame with only data considered as proxy of biomass can be used. DataFrame index has to be a float corresponding to a delta time (in hours) or pandas.DatetimeIndex

    • Parameters:
      • usemax: allow users by use chose between normalization methods: average of the first five points or percentage of the maximal value of dataset

      • percentofmax: allow users to change the percentage of maximal value used

    • Output: return a DataFrame with lagtime and maximal growth rate

  • fermmultiaux: Function to compute growths rates and lagtimes for multiauxies It is based on a mix of two algorithms describes in the following: Toussaint et al. 2006 and Hall et al. 2014. Whereas growth rates are found with local max computation.
    • Input: A DataFrame with only data considered as proxy of biomass can be used. DataFrame index has to be a float corresponding to a delta time (in hours) or pandas.DatetimeIndex

    • Parameters:
      • usemax: allow users by use chose between normalization methods: average of the first five points or percentage of the maximal value of dataset

      • percentofmax: allow users to change the percentage of maximal value used

    • Output: return a DataFrame with lagtimes and growth rates

  • multirename: Function to rename from a dictionary in forme {"newname" : (possibleoldname1, possibleoldname2)} and rename columns in a DataFrame like possiblename1 ==> new name.
    • Input: DataFrame, Dictionary with key as new column name and values list of values possibly used in the Dataframe as columns

    • Output: return a DataFrame with new columns names

Methods from plotlyfermy

  • ccplot: Function to compute and plot a simple (and pretty) Control Chart with Plotly express.
    • Input: Data will be values of the column named variableofinterest and index of the DataFrame as plot index

    • Parameters:
      • path: is provided the graph will be saved in this location.

      • dicorename: allow users to custom names of axis with {“old name” : “desired name”}.

      • forcepower: allow users to force scientific notation 10^n for the y-axis and control limits.

      • addccviol: allow users to add a new column to original data with CC rules check-in.

    • Output: return a DataFrame like data with only Control Chart violations data

  • fplotsimple: Plot all columns of a Dataframe as Y and index for x with Plotly express

  • fplotmultiy: Plot all columns of a Dataframe with autogenerated multi-y-axis and index for x.
    • Input: DataFrame

    • Parameters:
      • path: is provided the graph will be saved in this location

      • yspace: allow users to custom space between yaxis

      • sizep: allow users to custom font size

      • groupby: used character to build group for plotting e.g. groupby=”-” for pH-Biroeactor1 => group pH and subdataset bioreactor1

    • Output: No output only graph

Growth Rate Algorithm Description

  1. Normalization of data with two user-defined ways. First by divided all data points by a percentage (5 % percent by default) of the maximum value of the distribution. This option may be used if initial data are very noisy (e.g. Biomass proxy coming from a lab scale). Second method divide all data points by the average of the first five points (like in Toussaint et al. 2006). To be more robust regarding next steps each values under 1 is replaced by 1.

  2. Then natural logarithm is applied to the normalized data like in Toussaint et al. 2006

  3. A smoothing procedure is applied to the corrected biomass proxy by averaging each point with its eight closest neighbors like in Toussaint et al. 2006.

  4. The slope of each point was obtained by calculating the slope between the two fourth neighboring points on each side like in Toussaint et al. 2006.

  5. The exponential growth rate area (EGRA) is defined where slopes are equal to or greater than 95% of the maximum slope value like in Hall et al 2014.

  6. Finally, linear regression is calculated in the EGRA and the slope of the regression gives the maximum (specific) growth rate and the intercept gives Lag time.

Biological signification

  • The maximum (specific) growth rate (commonly express in per hours) is the growth rate during logarithmic growth phase (in batch culture) corresponding to the maximum value for the specific condition.

  • Lag time (commonly express in hours) is the duration of the phase where growth is absent at the beginning of the culture.

Bibliography

  • Hall B.G., Acar H., Nandipati A. and Barlow M. Growth rates made easy. Molecular Biology and Evolution, 31 (1):232-238, 2014.

  • Toussaint H., Levasseur G., Gervais-Bird J.,Wellinger R. J., Elela S. A., and Conconi A. A high-throughput method to measure the sensitivity of yeast cells to genotoxic agents in liquid cultures. Mutation Research/Genetic Toxicology and Environmental Mutagenesis, 606 (1-2):92-105, jul 2006.

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

fermy-0.2.tar.gz (76.3 kB view details)

Uploaded Source

Built Distribution

fermy-0.2-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file fermy-0.2.tar.gz.

File metadata

  • Download URL: fermy-0.2.tar.gz
  • Upload date:
  • Size: 76.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.5

File hashes

Hashes for fermy-0.2.tar.gz
Algorithm Hash digest
SHA256 2d17f7d063d79d0f7d304658be74b352758e087a4b11e3d02c1464a65d942a4e
MD5 e3183a25ff1126cfa368ba16b3a5819d
BLAKE2b-256 0fd0a9057728583cc1efd1d90ea1d3917242e92bf334fe37a251d54b8efbaca1

See more details on using hashes here.

File details

Details for the file fermy-0.2-py3-none-any.whl.

File metadata

  • Download URL: fermy-0.2-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.5

File hashes

Hashes for fermy-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb99e93840211bb7a4116d077fb8ef3eb2777451847b47a7805e5747aaae575d
MD5 46512290a297a4bab5f5dccb23044fe9
BLAKE2b-256 572fb03d9c0f20ca59e6469b525b131f21bfca8b94165164844a6c1e98c15314

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