Selecting cells in Seurat object based on an outcome of a complex function
0
0
Entering edit mode
2.6 years ago
kwicher ▴ 10

I would like to select cells from the Seurat object based on a relatively complex custom gene expression pattern. I am trying to do something like that:

sel.cells <- WhichCells(object, expression=function(x){
 ....
 if(something) return(TRUE)
}

My questions are:

  • is it possible?
  • how to reference individual gene expression levels in the function"
Seurat R subsett • 512 views
ADD COMMENT
0
Entering edit mode

Examples needed - question unclear.

ADD REPLY
0
Entering edit mode

I do not have an example.

The question is, can I use function as an expression? And if so if e.g. I have geneX and geneY and geneZ, can I select cells that fulfil the following criterium: if geneX count >0 then select the cell if geneY count > geneZ count and if geneX count = 0 then select the cell if geneY count < geneZ count .. or whatever complicated criterium one can thing of that require more than just simple comparison on individual gene counts.

Thanks

ADD REPLY

Login before adding your answer.

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