Im using this code for running t-sne . I want to do the t-sne on my whole data frame So is there way to label my points that are being clustered and as well as label them with different colours to make them visually differentiable .
These are my samples
CMP_6792" "CMP_7256" "CMP_7653" "GMP_6792" "GMP_7256" "GMP_7653" "HSC_6792"
"HSC_7256" "HSC_7653" "Mono_6792" "Mono_7256" "Mono_7653" "Gran1" "Gran2
I would like to label my points according to the above mentioned sample.
Here is my code
file1<- read.csv('PRIMARY_CELL_EPILIST.csv') head(file1) names(file1) class(file1) dat <- data.frame(file1) rownames(file1) <- make.names(file1[,1], unique = TRUE) head(file1) dim(file1) data <- file1[,2:15] head(data) library(tsne) tsne1 <- tsne(scale(data), perplexity = 10,max_iter = 300) plot(tsne1[, 1], tsne1[, 2]) library(ggplot2) plotdata <- data.frame(tsne_x = tsne1[, 1], tsne_y = tsne1[, 2]) plt1 <- ggplot(plotdata) + geom_point(aes(x = tsne_x, y = tsne_y)) plot(plt1)
So any help or suggestion as well as improvement over my code would be highly appreciated .