####pca analysis exDat=read.table("./demo/QN_PPP1.txt", as.is = T, header = T) PPP1=read.table("./demo/ID_PPP1.txt", as.is = T, header = T)
source("./R/qcFun.R") print(paste("Rcpp start: ", date())) pCorMc=proCorMatrix_c(exDat) print(paste("Rcpp end: ", date())) pCorMatHist(pCorMc) print(paste("R start: ", date())) pCorM=proCorMatrix(exDat) print(paste("R end: ", date())) layout(matrix(1:2, 1, 2)) plot(pCorMc[col(pCorMc)<row(pCorMc)], pCorM[col(pCorM)<row(pCorM)], main="Rcpp vs R", bty='l') eg=eigen(pCorMc) plot(eg$vectors[,1], eg$vectors[,2], xlab="PC 1", ylab="PC 2", bty='l', main = "PCA", pch=16, cex=0.5) idx=which(PPP1$Tissue=="A") points(eg$vectors[idx,1], eg$vectors[idx,2], cex=2, pch=16, col="pink") #misPro=proMissing(exDat) #missing per protein (column) #misInd=indMissing(exDat) #missing per individual (row)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.