Question: How to get real cell names from Seurat Object?
gravatar for leranwangcs
10 days ago by
leranwangcs40 wrote:


I'm trying to extract cell names from my seurat object. I tried


But all I got was:


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!

rna-seq • 86 views
ADD COMMENTlink modified 10 days ago by from the mountains130 • written 10 days ago by leranwangcs40
gravatar for from the mountains
10 days ago by
United States
from the mountains130 wrote:

Do you mean cell type, rather than cell name? Seurat doesn't automatically annotate your cells with the cell type. You can do that through manual intervention with the RenameIdents function, or you can get the SingleR package from bioconductor to "guess" it for you. you can get the current identity with the Idents function.

ADD COMMENTlink written 10 days ago by from the mountains130

Thanks for the reply! I was confused because in a seurat tutorial, it says there was a column called cellType which looks like this:

##            nGene  nUMI    orig.ident  celltypes nCount_RNA nFeature_RNA
## X7873M.1    3563 11796 SeuratProject Macrophage      11796         3563
## X7873M.104  2670  7570 SeuratProject Macrophage       7570         2670
## X7873M.105  2241  5510 SeuratProject Macrophage       5510         2241
## X7873M.106  4705 22636 SeuratProject        CAF      22636         4705
## X7873M.110  3169 11690 SeuratProject Macrophage      11690         3169
## X7873M.114  4659 20798 SeuratProject Macrophage      20798         4659

and if you run:


the output should be something like this:

##  Naive CD4 T Memory CD4 T   CD14+ Mono            B        CD8 T 
##          697          483          480          344          271 
## FCGR3A+ Mono           NK           DC     Platelet 
##          162          155           32           14

However, I don't have the "cellType" column contained in the slot:

                                               orig.ident.  nCount_RNA nFeature_RNA
AATGAAGAGAGCCGTA-1     BAAK_B       1573          743
ACTATGGGTTGACGGA-1     BAAK_B       5883         2049
ACTGTCCAGGAAGTCC-1     BAAK_B      14083         2945
AGATCGTCACTTGTCC-1     BAAK_B       6661         2211
AGCGTATAGTCTTGGT-1     BAAK_B        520          285

And if I do Idents(BAAK_B) I got something like this:

            BAAK_B                          BAAK_B                                 BAAK_B                              BAAK_B    
            BAAK_B                                   BAAK_B                           BAAK_B                           BAAK_B

And if I use "RenameIdents", I need a list of cell names to assign to the 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!!

ADD REPLYlink written 10 days ago by leranwangcs40

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.

ADD REPLYlink written 10 days ago by rpolicastro4.0k

Thanks very much for your help!!

ADD REPLYlink modified 8 days ago • written 8 days ago by leranwangcs40
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2192 users visited in the last hour