Revision 3 as of 2007-04-19 05:53:24

Clear message

Using R to examine a Growth Curve and calculate Doubling Time

Pichia pastoris was grown in liquid culture. Aliquots were taken at various times post-innoculation, and measured by OD600. When the aliquots surpassed the linear range of the spectrophotometer they were diluted before reading. Thus the input data file has 5 columns: time post-innoculation, minutes, dilution factor, OD reading, derived OD.

1.) Read the data into R

# read the data into R from a tab-delimited text file
gdata <- read.table(file="yeast_timecourse.txt", sep="\t", header=T)

# what are the column names?
colnames(gdata)

2.) plot the derived OD600 readings as a function of time

# columns of interest are:
# minutes (2nd column) and dOD600 (5th column, derived OD600)
# examine a plot of OD versus time
plot(gdata[,2], gdata[,5])

# could also use column names to specify columns:
plot(gdata[,"minutes"], gdata[,"dOD600"])

# make the plot look nicer
plot(gdata[,2], gdata[,5], main="OD versus Time", xlab="minutes", ylab="OD600")

3.) Find the portion of the curve which is linear during exponential phase growth

(hint: plot log of OD versus time)

# since this is a growth curve, we want to plot the log
# of the OD
plot(gdata[,2], log(gdata[,5]), main="OD versus Time", xlab="minutes", ylab="log(OD600)")

# pick the part of the curve that looks linear
# maybe points 3 through 6?

4.) use the linear modeling function to to perform regression

The resulting slope can be used to find the yeast doubling time.

# use lm() to fit this part of the curve
# fit y as a function of x (or OD as a function of time)
# but only use the points of interest
lm(log(gdata[3:6,"dOD600"]) ~ gdata[3:6,"minutes"])

# save the linear fit to an object called "fit"
fit <- lm(log(gdata[3:6,"dOD600"]) ~ gdata[3:6,"minutes"])

# give the fit to the abline() function to draw a line on the plot
abline(fit)

# the fit object is kind of complicated
# it's got lots of stuff in it
names(fit)

# however the slope of the line can be found by looking
# at the second coefficient
fit$coef[2]

# use the slope to calculate the doubling time of the
# cells during their exponential growth phase
# the formula is log(2)/k where k is the growth rate (slope from the curve)
log(2)/fit$coef[2]

# write the doubling time on the curve
text(800,-2,"Doubling Time = 130 minutes")