Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #run PCA
- pca.results <- prcomp(t(expression))
- #vector of colors
- cols <- as.character(indata$Annotation)
- cols[cols=="K"] <- 'red'
- cols[cols=="LG"] <- 'lightgreen'
- cols[cols=="G"] <- 'darkgreen'
- #plot it
- plot(pca.results$x[,1], pca.results$x[,2], col=cols)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement