Posts

Showing posts with the label growth curve

How to draw a growth curve in R

Image
In a growth curve of a bacteria, we will have the optical density measurements against time. For each time point, we will have a few technical replicates. Let’s take the following data which has time, and replicates A, B, and C. We have saved this table in a excel file. The file is named as growth_curve.xlsx and is stored in a folder/directory called datasets , relative to my current working directory. First thing we would do is load the tidyverse library, which will have the ggplot2 library we will use for plotting the growth curve. library(tidyverse) We will first read the data from excel into tibble and see how it looks like. data <- readxl::read_excel('datasets/growth_curve.xlsx') data Then, we will see the whole code to process and plot the data and later explain it step by step. # calculate mean and standard deviations data <- data %>% rowwise() %>% mutate( means = mean(c(A, B, C)), stdev = sd(c(A, B, C)) ) # plot the means and standar...

Plotting growth curve using python

Image
Data plotting can be easily done in excel. Excel is a very easy and efficient tool for calculations and plotting of biological data and most people including me prefer it. With excel one has to plot the data and do all customization each and every time for a new data set. Therefore, when it comes to plotting multiple datasets of similar nature over and over again, using a programming language is more efficient. Once a template code for a plot is ready, one can plot any number of data sets with it in a few seconds. Here we will see how to plot a simple scatter plot by taking an example of growth profile (i.e. data of time vs O.D.) of a cell culture. The reading are from three experiments. The O.D.s were taken from 0 to 6 hours at an interval of one hour.