require(ggplot2) require(radii)
# load the data: the gel filtration elusion profile file <- system.file("extdata", "160826bioradstdpH74EDTA_HiLoad.asc", package="radii") HiLoad_std <- read.csv(file, header = TRUE, skip=2, sep = "\t"); HiLoad_std <- na.omit(HiLoad_std[, 1:2]) # plot the data: gel filtration profile # with(HiLoad_std, plot(mAU ~ ml, type = "l", main = "HiLoad: Biorad STD")) # g <- radii:::ggplot() g <- g + ggplot2::geom_line(aes(ml, mAU), data=HiLoad_std) g <- g + ggtitle("HiLoad: Biorad std") + xlab("Vol (mL)") + ylab("A280 (mAU)") label=as.character(radii::protein_std_HiLoad$ve) pos <- data.frame(x= as.numeric(label),y = c(42, 29, 21, 34, 20)) g <- g + annotate("text", label=label, x=pos$x, y=pos$y) print(g)
# superdex 200 HiLoad 16/60 vt = mean(c(122.31,122.93)) vo = mean(c(47.26,46.59)) protein_std_HiLoad$sigma <- radii::partition_coef(protein_std_HiLoad$ve, vo=vo, vt=vt) protein_std_HiLoad$erfcinv <- radii::erfcinv(protein_std_HiLoad$sigma) # knitr::kable(protein_std_HiLoad, format = "markdown") protein_std_HiLoad <- na.omit(protein_std_HiLoad) fit <- lm (radii~erfcinv+1, data = protein_std_HiLoad) summary(fit) xdat <- seq(min(protein_std_HiLoad$erfcinv), max(protein_std_HiLoad$erfcinv),by = 0.01 ) pred <- predict(fit, newdata = data.frame(erfcinv=xdat)) # Plotting g = radii:::ggplot() + geom_point(data = protein_std_HiLoad, aes(erfcinv, radii)) g <- g + ggtitle(expression("Stokes raddi vs erfcinv (" ~ sigma ~ ")")) g + geom_line(aes(xdat,pred))
# superdex 200 HiLoad 16/60 vt = mean(c(122.31,122.93)) vo = mean(c(47.26,46.59)) # sample data ve_D1D2_pure = 74.36 sigma_D1D2_pure=radii::partition_coef(ve_D1D2_pure, vo=vo, vt=vt) erfcinv_D1D2_pure= radii::erfcinv(sigma_D1D2_pure) r_D1D2_pure = predict(fit, newdata = data.frame(erfcinv=erfcinv_D1D2_pure)) print(paste("Stokes radius of the purified D1D2", r_D1D2_pure, "nm"))
# D1D2 ve_D1D2_plasma = 81 sigma_D1D2_plasma=radii::partition_coef(ve_D1D2_plasma, vo=vo, vt=vt) erfcinv_D1D2_plasma= radii::erfcinv(sigma_D1D2_plasma) r_D1D2_plasma = predict(fit, newdata = data.frame(erfcinv=erfcinv_D1D2_plasma)) print(paste("Stokes radius of the purified D1D2", r_D1D2_plasma, "nm"))
summary(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.