# Kinetic fitting of irreversible inhibition in a case of large Ki # Remaining activity = 100 x exp (-kobs*t) # kobs = kinact*[I] / (Ki + [I]) # Created by S. Fushinobu (2020.11.18) # Edit the parameters below expdecay.df <- read.csv("/Users/fushi/Documents/R/Irrinh-large-Ki-R-data.csv") Mtitle <- "Irreversible Inhibition" # main title of the plot Inhname <- "Inhibitor" Inhunit <- "mM" Timeunit <- "min" kobsinit <- 0.1 # initial values for fitting #kinactinit <- 1 #Kiinit <- 2.0 ncurve <- ncol(expdecay.df) -1 kobsvec <- c() Inhvec <- c() #plot blank plot(0,0, pch="", xlim=c(0,max(expdecay.df[,1], na.rm=TRUE)),ylim=c(0,100), main=paste(Mtitle,"exponential decay to get kobs"),xlab=paste(Inhname,Inhunit),ylab="Remaining Activity (%)") # write legends labels <- paste(colnames(expdecay.df)[-1],Inhunit) legend("topright", legend = labels, pch=c(1:length(labels)), lty=c(1:length(labels)), bg="white") for (i in 1:ncurve){ ithdata.df <- expdecay.df[,1] ithdata.df <- cbind(ithdata.df,expdecay.df[i+1]) colnames(ithdata.df) <- c("time","rem_act") ithdata.df <- subset(ithdata.df, rem_act != "NA") points(ithdata.df$time,ithdata.df$rem_act, pch=i) expdecay.nls <- nls(rem_act ~ 100*exp(-(kobs*time)), data=ithdata.df, start=list(kobs=kobsinit)) summary(expdecay.nls)$parameters kobs <- unname(coef(expdecay.nls)["kobs"]) kobsvec[i] <- kobs Inhvec[i] <- substr(colnames(expdecay.df)[i+1],2,nchar(colnames(expdecay.df)[i+1])+1) curve(100*exp(-kobs*x),0,max(ithdata.df$time),add=TRUE,lty=i) mtext(paste(colnames(expdecay.df)[i+1],": kobs = ",signif(kobs,digits=3),"±",signif(summary(expdecay.nls)$parameters[1,2],digits=3),Timeunit,"(-1)"),side=1,line=-i,adj=0) } Inhkobs.df <- data.frame(conc=as.numeric(Inhvec),kobs=kobsvec) # generate a replot (Inh - kobs) with kobs data dev.new() plot(Inhkobs.df$conc,Inhkobs.df$kobs,xlim=c(0,max(Inhkobs.df$conc)),ylim=c(0,max(Inhkobs.df$kobs)),main=paste(Mtitle," ([",Inhname,"]-kobs)",sep=""),xlab=paste("[",Inhname,"] (",Inhunit,")",sep=""),ylab=paste("kobs (1/",Timeunit,")",sep="")) # Estimate Kinact/Ki by linear fit Linearfit.lm <- lm(kobs ~ conc - 1,Inhkobs.df) abline(Linearfit.lm) mtext(paste("Kinact/Ki = ",signif(unname(coef(Linearfit.lm)["conc"]),digits=3),Timeunit,"(-1)",Inhunit,"(-1)"),side=1,line=-1,adj=1)