I attempted to use lymphGate to select the lymphocyte population from 10 FCS files. I used the following code:
rg <- rectangleGate(filterId="preselection", list("FSC-A"=c(20, 125),"SSC-A"=c(0, 100)))
lg <- flowStats::lymphGate(tflowData, channels=c("FSC-A", "SSC-A"), , preselection = "APC-eFluor 780-A", rectDef = rg, scale = 1.0, bwFac=1.3, evaluate=TRUE)
xyplot(`SSC-A`~`FSC-A`, tflowData, filter = lg$n2gate, layout = c(5,2))
Based on the lymphGate documentation, I expected that I would input the parameter that defines a rectangle ("rg") and then lymphGate ("lg") would fit a bivariate normal distribution to the cells contained within the preselected rectangle ("rg"). Then it would identify an elliptical population within the rectangle.
However, the results I got selected an ellipsoid that is outside of the rectangle. Why is this happening with the preselection parameter?
