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"
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