how to subset Seurat object by gene names
1
0
Entering edit mode
8 weeks ago
leranwangcs ▴ 40

Hi,

I created an integrated seurat object. And I used SingleR to do the cell annotation and joined that information to the seurat object.

I'm now trying to find in which cells have certain gene present. I tried to extract the data slot from seurat object, then subset it based on the row names (genes), but that only gave me the barcode of genes but not associated with the real cell annotation.

So is there a way like built-in command in seurat allowing that?

Thanks so much!! Leran

Seurat scRNA • 415 views
1
Entering edit mode
8 weeks ago

Many of the commands here might be of interest to you.

Genes do not have barcodes, so I assume you mean cells. If you just trying to grab the cells that express a gene at a given level, then the subset command is probably what you want. See the linked page for examples.

0
Entering edit mode

Yes I meant cell barcode, thanks! And subset() worked perfectly! Thank you so much @jared.andrew07