Calling gene names from a list within Seurat subset function
0
1
Entering edit mode
4.6 years ago
cook.675 ▴ 230

I have a list of 5 cytokines here:

cyto <- c("Ccl1", "Ccl2", "Ccl3", "Ccl4", "Ccl5")

I'm trying to get the subset function in Seurat to subset based on the expression level of one of these without referring to the actual gene name in the function. For example, here is the typical way:

Sample <- subset(Data, Ccl1 > 0)

But I would like to call it from the list. I have tried these 3 methods:

Sample <- subset(Data, cyto[1] > 0)
Sample <- subset(Data, `cyto[1]` > 0)
Sample <- subset(Data, "cyto[1]" > 0)

All 3 methods return the error which is related to not recognizing the gene name:

Error in FetchData(object = object, vars = expr.char[vars.use], cells = cells,  : 
  None of the requested variables were found:

I can't think of another method to try. Is it possible to do this?

Thanks!

seurat RNA-Seq • 1.9k views
ADD COMMENT
0
Entering edit mode

I know this was from 3 years ago...but were you able to find a solution by any chance? I'm running into the same issue!

ADD REPLY

Login before adding your answer.

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