Searching expression for one particular gene in Seurat object issue (Seurat, R)
1
0
Entering edit mode
3.3 years ago
Ondina ▴ 100

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

Seurat scRNA-seq R • 3.6k views
ADD COMMENT
0
Entering edit mode

counts_svep1 <- subset(x = scrna_m, my_gene > 60)

Are you using my_gene or actual gene name?

ADD REPLY
0
Entering edit mode

actual gene name, I wrote my_gene just for the example

It was like this counts_svep1 <- subset(x = scrna_m, ENSMUSG00000028369 > 2)

ADD REPLY
1
Entering edit mode

Hmmmmm!!

I think you need to mention the subset argument explicitly because the second positional argument for the subset() is cells and in your example, the specified condition is for the features.

something like this,

counts_svep1 <- subset(x = scrna_m, features = ENSMUSG00000028369 > 2)
ADD REPLY
2
Entering edit mode
3.3 years ago

See the Seurat cheatsheet. You can do this via:

counts_svep1 <- subset(x = scrna_m, subset = ENSMUSG00000028369 > 2)

ADD COMMENT

Login before adding your answer.

Traffic: 1719 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