#TenFoldCVTimesTen_VirtualToxicityPanel_MMGBSA.R #Requires the R package 'glmnet' print("Reading in datasets...") #Specify filepath in quotes filepath <- "" #Read in GB re-scored CSV file as a data frame dockScores <- read.csv(paste(filepath,"N560_p33_MMGBSAScore_Matrix.csv",sep=""),header=T) dockScores <- as.matrix(dockScores[,5:ncol(dockScores)]) #Read in ADR group response matrix Y <- read.csv(paste(filepath,"N560_p10_DrugADR_Matrix.csv",sep=""),header=T) #Set binding threshold for MM/GBSA scores #dockThresh <- -25.0 print("...finished!") print("Generating the design matrix...") #Generate the design matrix dataMatrix <- matrix(nrow=nrow(dockScores),ncol=16) i <- 0 while(idockThresh) dataMatrixNew[i,kcnt2] <- 0 } } } rm(dataMatrix) dataMatrix <- dataMatrixNew rm(dataMatrixNew) dataMatrixNew <- matrix(nrow=nrow(dataMatrix),ncol=kcnt2) j <- 0 while(j1) chosenOneIndx <- chosenOneIndx[[1]] tenCVResultsMatrix[i,1] <- lambdaMinVect[[chosenOneIndx]] tenCVResultsMatrix[i,2] <- cvloVect[[chosenOneIndx]] tenCVResultsMatrix[i,3] <- cvmVect[[chosenOneIndx]] tenCVResultsMatrix[i,4] <- cvupVect[[chosenOneIndx]] tenCVResultsMatrix[i,5] <- nzeroVect[[chosenOneIndx]] betaVect <- vector(length=length(betas[chosenOneIndx,])) nn <- 0;while(nn