This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Selecting cells in Seurat object based on an outcome of a complex function

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

Examples needed - question unclear.

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

0 answers

No answers yet.

Log in to answer this question.