Advertisement
Guest User

Untitled

a guest
May 25th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #run PCA
  2. pca.results <- prcomp(t(expression))
  3.  
  4. #vector of colors
  5. cols <- as.character(indata$Annotation)
  6. cols[cols=="K"] <- 'red'
  7. cols[cols=="LG"] <- 'lightgreen'
  8. cols[cols=="G"] <- 'darkgreen'
  9.  
  10. #plot it
  11. plot(pca.results$x[,1], pca.results$x[,2], col=cols)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement