Place summary stats in names in flowViz xyplot
1
0
Entering edit mode
Aric Gregson ▴ 270
@aric-gregson-3058
Last seen 9.6 years ago
Hello, I'm trying to get the summary stats, such as the percent positive events, to be drawn onto the xyplot in place of the gate name. I can get this to work fine with the following code for a single file, but I am having trouble getting the results for the entire flowSet to be printed. xyplot(`APC.H7.A` ~ `Pacific.Blue.A`, Data(wf[["agate"]]), filter=afilter, smooth=F, alpha=0.5, pch=21, cex=0.4, -> subset = Filename == 327, scales=list(tick.number=10), outline=TRUE, -> names = format(summary(wf[["anothergate"]])$percent [[4]], digits =3), par.settings=list(gate=list(col="purple", alpha=.3), gate.text=list(col="black", alpha=0.7, cex=0.6))) Removing subset and attempting to get all of the stats placed causes only the first value of the flowSet summary result to be placed in all plots. For example, > summary(wf[["anothergate"]])$percent [1] 28.940568 5.272565 8.464079 46.257443 28.265877 When plotted only 28.9 is placed in all plots. I have tried many variations, including trying to make it a factor and plotting the levels, but then of course it only plots the first ordered level in all plots. Any suggestions would be greatly appreciated. Thanks, Aric
• 922 views
ADD COMMENT
0
Entering edit mode
Florian Hahne ▴ 540
@florian-hahne-2471
Last seen 9.6 years ago
Hi Aric, you have to adapt the panel function to make this happen. Start by taking a look at panel.xyplot.flowframe in the flowViz package. Seems like all you need to do is add an appropriate names argument to the call to glpolygon. The modified panel function has then to be supplied to the xyplot function via the panel argument. An even cleaner solution would be to have your panel function call the predefined flowVIz one without plotting the gates, and then adding gates including the names in a second step. Deepayan's lattice book available from Springer is an excellent source to learn more about the concept of lattice and the panel function. Florian On 18.03.2009, at 19:36, Aric Gregson wrote: > Hello, > > I'm trying to get the summary stats, such as the percent positive > events, to be drawn onto the xyplot in place of the gate name. I can > get this to work fine with the following code for a single file, but I > am having trouble getting the results for the entire flowSet to be > printed. > > xyplot(`APC.H7.A` ~ `Pacific.Blue.A`, > Data(wf[["agate"]]), > filter=afilter, > smooth=F, > alpha=0.5, > pch=21, > cex=0.4, > -> subset = Filename == 327, > scales=list(tick.number=10), > outline=TRUE, > -> names = format(summary(wf[["anothergate"]])$percent > [[4]], digits =3), > par.settings=list(gate=list(col="purple", alpha=.3), > gate.text=list(col="black", alpha=0.7, cex=0.6))) > > Removing subset and attempting to get all of the stats placed causes > only the first value of the flowSet summary result to be placed in all > plots. For example, > >> summary(wf[["anothergate"]])$percent > [1] 28.940568 5.272565 8.464079 46.257443 28.265877 > > When plotted only 28.9 is placed in all plots. I have tried many > variations, including trying to make it a factor and plotting the > levels, but then of course it only plots the first ordered level in > all > plots. > > Any suggestions would be greatly appreciated. > > Thanks, Aric > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

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