# Michaelis-Menten type enzyme kinetics fitting (S-v plot) # Multiple curves version # Written by S. Fushinobu (2019.10.22) # Thanks to Carly Huitema & Geoff P Horsman # Edit the parameters below MM.df <- read.csv("/Users/fushi/Documents/R/Michaelis-multi.csv") Mtitle <- "Michaelis-Menten plot" # main title of the plot Substname <- "Substrate" Substunit <- " (mM)" Vunit <- " (units/mg)" Kminit <- 4 # initial values for fitting Vmaxinit <- 35 mono <- FALSE # FALSE for color, TRUE for monochrome ncurve <- ncol(MM.df) -1 if (mono) { plot.color <- rep(1,ncurve) } else { plot.color <- rainbow(ncurve) } #plot blank plot(0,0, pch="", xlim=c(0,max(MM.df[,1], na.rm=TRUE)),ylim=c(0,max(MM.df[,-1], na.rm=TRUE)), main=Mtitle,xlab=paste(Substname,Substunit),ylab=paste("v",Vunit)) # write legends labels <- colnames(MM.df)[-1] legend("topleft", legend = labels, pch=c(1:length(labels)), lty=c(1:length(labels)), col=plot.color[1:length(labels)], bg="white") for (i in 1:ncurve){ ithdata.df <- MM.df[,1] ithdata.df <- cbind(ithdata.df,MM.df[i+1]) colnames(ithdata.df) <- c("conc","rate") ithdata.df <- subset(ithdata.df, rate != "NA") points(ithdata.df$conc,ithdata.df$rate, col=plot.color[i], pch=i) MM.nls <- nls(rate ~ (Vmax * conc / (Km + conc)), data=ithdata.df, start=list(Km=Kminit, Vmax=Vmaxinit)) summary(MM.nls)$parameters Km <- unname(coef(MM.nls)["Km"]) Vmax <- unname(coef(MM.nls)["Vmax"]) curve(Vmax*x/(Km+x),0,max(ithdata.df$conc),add=TRUE,col=plot.color[i],lty=i) mtext(paste(colnames(MM.df)[i+1],": Km = ",signif(Km,digits=3),"±",signif(summary(MM.nls)$parameters[1,2],digits=3),Substunit,"; Vmax = ",signif(Vmax,digits=3),"±",signif(summary(MM.nls)$parameters[2,2],digits=3),Vunit),side=1,line=-i,adj=0) }