Hello!
I have identified 4 clusters in my sce object and would like to know the cell IDs in a particular cluster. I know the > table(sce$clusters) command shows me the number of cells in each cluster, however I can't work out how to see the cell IDs. Anyone know?
In Seurat I use >head(Idents(x), 10) and it will show the first 10 cell IDs in 'x' with the cluster number next to them.
Would love something like this with my sce object!
Thanks for your help!!!
# Making up a SCE with some made-up clusters:
library(scater)
sce <- mockSCE()
sce$cluster <- sample(LETTERS, ncol(sce), replace=TRUE)
# Get a specific cluster's IDs:
colnames(sce)[sce$cluster=="A"]
## [1] "Cell_008" "Cell_018" "Cell_045" "Cell_073" "Cell_086" "Cell_125" "Cell_138"
## [8] "Cell_162"
# Show everything in a data frame:
colData(sce)[,"cluster",drop=FALSE]
## DataFrame with 200 rows and 1 column
## cluster
## <character>
## Cell_001 Y
## Cell_002 Z
## Cell_003 C
## Cell_004 N
## Cell_005 O
## ... ...
## Cell_196 W
## Cell_197 L
## Cell_198 B
## Cell_199 J
## Cell_200 E
Thank you so much!!! Really appreciate the help! :-)