Entering edit mode
3.8 years ago
leranwangcs
▴
150
Hi,
I'm trying to extract cell names from my seurat object. I tried
colnames(BAAK_B@assays$RNA@data)
But all I got was:
"AATGAAGAGAGCCGTA-1" "ACTATGGGTTGACGGA-1" "ACTGTCCAGGAAGTCC-1" "AGATCGTCACTTGTCC-1" "AGCGTATAGTCTTGGT-1" "AGCGTATCACTCTAGA-1" "AGCTACAGTCCAGCAC-1" "AGCTTCCGTGGCAGAT-1" "AGCTTCCTCAAGTCTG-1" "AGGACTTGTTATTCTC-1"
I wondered if this is what seurat supposed to generate? Or is there any way to get some real cell names? Such as "tuft" cell?
Thanks very much!
Thanks for the reply! I was confused because in a seurat tutorial, it says there was a column called cellType which looks like this:
and if you run:
the output should be something like this:
However, I don't have the "cellType" column contained in the meta.data slot:
And if I do Idents(BAAK_B) I got something like this:
And if I use "RenameIdents", I need a list of cell names to assign to the new.ident.name parameter, but could that be done only if I have known which cell type should be assigned to which?
I can try SingleR, but I'm curious if this is a must step to get cell type, why not seen in most of the tutorial? I'm worried if I missed anything so that the cellType column is missing?
Thank you!!
In the tutorials the cell types were defined previously by a researcher, and are not generated automatically. You need to manually label your clusters/cell types, or use a program like singleR (which was stated above) to infer cell types.
Thanks very much for your help!!