I don't know if it's normal but when I filter my seurat object by a particular gene expression, I have the following results:
My gene expression quantiles look like this:
`0% 25% 50% 75% 100% : 0.0 10.0 61.5 300.0 4029.0` So the maximum expression is 4029 and the minimum is 0.
I can't use counts_svep1 <- subset(x = scrna_m, my_gene > 60)
because the following error appears Error in CellsByIdentities(object = object, cells = cells) : Cannot find cells provided
. 60 is > 0 and < 4029, right? It should be a right value to use.
But if I do this counts_svep1 <- subset(x = scrna_m, my_gene > 2)
It cuts the data like this:
`0% 25% 50% 75% 100% : 529 860 1087 1733 4029`
How does this work? What is the logic behind it?
Used the way to subset the seurat object discussed here : subsetting out cells from seurat object based on expression of 1 gene
Are you using
my_gene
or actual gene name?actual gene name, I wrote my_gene just for the example
It was like this
counts_svep1 <- subset(x = scrna_m, ENSMUSG00000028369 > 2)
Hmmmmm!!
I think you need to mention the
subset
argument explicitly because the second positional argument for thesubset()
iscells
and in your example, the specified condition is for the features.something like this,