Plot Multiple 'Backgates' Simultaneously flowViz
0
0
Entering edit mode
Aric Gregson ▴ 270
@aric-gregson-3058
Last seen 10.2 years ago
Hello, I'm wondering if there is a way to demonstrate multiple back-gated populations within the same xyplot with smooth=F. For example, we create a gate based upon a previously defined quadrantGate: > rect.eff.cd8.gate <- rectangleGate("PerCP.Cy5.5.A"=c(0, + quadGate.memory.CD8 at boundary[[1]]), "PE.Cy7.A"=c(0, + quadGate.memory.CD8 at boundary[[2]]), filterId="CD8_EFFECTOR") Using xyplot with smooth=FALSE and this gate as the filter, I can create a backgate of sorts into another population as follows: xyplot(`PE.A` ~ `Alexa.Fluor.700.A`, Data(wf[['CD8+']]), filter=rect.eff.cd8.gate, smooth=F, par.strip.text=list(cex=0.7), par.settings= list(gate=list(col="purple", alpha=.3)) ) which appears to overplot the gated cells in purple. This is a nice feature to use once in a while. It would be even nicer if I could overplot several different gates at the same time with different colors. I have tried using the following function in a plot call: > my.panel <- function(x, y, ..., frame, my.filter) + { + panel.xyplot(x, y, ...) + glpolygon(filter(frame, my.filter)) + } or the following which will plot multiple filters as long as all channel names are the same, but complains that channel names do not match when attempting the backgating: > xyplot( `SSC-H` ~ `FSC-H` , data=GvHD[[1]], + panel = function(...) { + panel.xyplot.flowset(...) + glpolygon( Filter1 ) + glpolygon( Filter2 ) + } + ) I have also tried to replace 'glpolygon' with 'gpoints' to no effect. Using a filter.result does not change the situation either. I suspect this is possible to do if one has a better understanding of lattice. Thanks in advance for any suggestions. Aric
• 1.1k views
ADD COMMENT

Login before adding your answer.

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