Adding multiple gates/filters in densityplot [flowViz]
0
0
Entering edit mode
Michael Jahn ▴ 10
@michael-jahn-4819
Last seen 9.6 years ago
Hi R-Users, I failed at drawing multiple filters in a densityplot() using the FlowCore/FlowViz packages. I found a way to draw multiple filters in xyplot(), using the glpolygon method within the panel-function, but some similar attempts for densityplot failed. I could draw simply some vertical lines using panel.abline, but this doesn't look as appealing as the original method when using a single filter with the standard filter=xyz argument. I bet there is a method to draw multiple gates through the panel- function, as the curv1filter can also identify multiple peaks automatically and draw them in a densityplot... This script works for  xyplot but not for densitylot:     library(flowCore)     library(flowViz)     data(GvHD)     Filter1        <-    rectangleGate(filterId="Filter1", "FSC-H" = c(0, 200))     Filter2        <-    rectangleGate(filterId="Filter1", "FSC-H" = c(300, 400))     xyplot( `SSC-H` ~ `FSC-H` , data=GvHD[[1]],         panel = function(...) {             panel.xyplot.flowset(...)            glpolygon( Filter1 )            glpolygon( Filter2 )         }     )     densityplot( ~ `FSC-H`, data=GvHD[[1]],         panel = function(...) {             panel.densityplot.flowset(...)             glpolygon( Filter1 )             glpolygon( Filter2 )         }     ) The glpolygon method yields not the "typical" look of the densityplot filters, but red lined gate boundaries. Thank you in advance. All the best, Michael -- Michael Jahn PhD student Helmholtz-Centre for Environmental Research Leipzig, Germany http://www.ufz.de(http://www.ufz.de/) [[alternative HTML version deleted]]
• 1.2k views
ADD COMMENT

Login before adding your answer.

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