How to use WhichCells Function to label clusters
The WhichCells function can pull the names of cells that were experimentally marked as iPS cells, and find that they have been placed in cluster 7)
ips.cells=WhichCells(nbt,"iPS",id = "orig.ident")
my.data=FetchData(nbt,"ident",cells.use = ips.cells)
head(my.data,2)
ident Hi_iPS_1 7 Hi_iPS_2 7
When I use the function though, the idents column do not return the cluster ID
FetchData(stemcells, c("ident", "orig.ident"))
ident orig.ident old_LT_HSC_2 old old old_LT_HSC_3 old old
Before, I've subsetted my data into control and stimulated cells. How can I get the cluster ID for all the cells?
• 3,875 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Your question/post is a little bit raw but from what I understand you are using Seurat for single cell analysis. As far as I can see from your code, you are feeding different objects nbd and stemcells to WhichCells() and FetchData() respectively, I am not surprised that you get different outputs.
And for your question on how to get cluster ID, please check the @meta.data slot of your Seurat object. If I remember correctly cluster ids are stored in a column for which the column name is either prefixed our suffiexed by "res" and then the "resolution" parameter used for clustering.