-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add customized clustering info to seurat object #530
Comments
essentially I want to cluster single cells using k-means and color the points in the tsne plot. now the clustering is based on a graph-based (KNN) method, and do differentially expression based on the k-means clusters |
Hi Tommy, If you have already computed these clustering independently, and would like to add these data to the Seurat object, you can simply add the clustering results in any column in # Add k-means clustering results to 'object@meta.data$k.means.clusters'
object@meta.data$k.means.clusters <- k.means.result
# Plot tSNE, and colour cells by k-means identity
TSNEPlot(object = object, group.by = "k.means.clusters") Best, |
Thank you! this helped! |
I am trying to do something similar
And I get the error:
|
Hi thanks |
You can also do like:
|
Hi,
With the scaled (regressed) seurat object, how can I add K-means clustering or hierarchical clustering info to it?
Thanks!
Tommy
The text was updated successfully, but these errors were encountered: