how to subset Seurat object by gene names
1
0
Entering edit mode
3.6 years ago
leranwangcs ▴ 150

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 • 8.8k views
ADD COMMENT
1
Entering edit mode
3.6 years 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.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2956 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6