This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to subset Seurat object by gene names

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

1 answer

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.

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

Log in to answer this question.