FlowViz xyplot event limit
1
0
Entering edit mode
Roger Leigh ▴ 60
@roger-leigh-4255
Last seen 10.2 years ago
Hi, I'm using xyplot with smooth=FALSE, outline=TRUE to get a plain dotplot. Unfortunately, some of my data has a great deal of events (~5?10?), and even after gating the number of dots is too great. Details are lost, and the size of the PDF output is huge. What I'd like to do is restrict the plot to a certain number of events e.g. 1?10?. This doesn't appear to be directly possible with xyplot. Can a flowFrame be trimmed down to a certain number of events, such as the first 1?10?? Due to gating, I can't gate on the event count because this won't give me /n/ events because the numbers aren't continuous. Many thanks, Roger Leigh
• 1.3k views
ADD COMMENT
0
Entering edit mode
drambald ▴ 80
@drambald-4243
Last seen 10.2 years ago
I am still practicing with flowCore, but what about this?: lines <- sample(100:500, 50) y <- read.FCSfile.name, which.lines=sample) regards Davide On Mar 1, 2011, at 4:34 PM, Roger Leigh wrote: > Hi, > > I'm using xyplot with smooth=FALSE, outline=TRUE to get a plain > dotplot. Unfortunately, some of my data has a great deal of > events (~5?10?), and even after gating the number of dots is too > great. Details are lost, and the size of the PDF output is huge. > > What I'd like to do is restrict the plot to a certain number of > events e.g. 1?10?. This doesn't appear to be directly possible > with xyplot. Can a flowFrame be trimmed down to a certain number > of events, such as the first 1?10?? Due to gating, I can't gate on > the event count because this won't give me /n/ events because the > numbers aren't continuous. > > > Many thanks, > Roger Leigh > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor Davide Rambaldi, Bioinformatics PostDoc. ----------------------------------------------------- IFOM-IEO Campus Via Adamello 16, Milano I-20139 Italy [t] +39 02574303870 [e] davide.rambaldi at ifom-ieo-campus.it
ADD COMMENT
0
Entering edit mode
Hi, Roger Subsampling your data for plotting runs the risk of losing details in rwgioms of low density (i.e. rare events). Another option would be to use contour plots of the density estimate (if I recall correctly, flowViz does support this) or simply pass smooth=TRUE. Best, Greg Sent from my iPhone On 2011-03-01, at 7:46 AM, "Davide Rambaldi" <davide.rambaldi at="" ifom-="" ieo-campus.it=""> wrote: > I am still practicing with flowCore, but what about this?: > > lines <- sample(100:500, 50) > y <- read.FCSfile.name, which.lines=sample) > > regards > Davide > > > On Mar 1, 2011, at 4:34 PM, Roger Leigh wrote: > >> Hi, >> >> I'm using xyplot with smooth=FALSE, outline=TRUE to get a plain >> dotplot. Unfortunately, some of my data has a great deal of >> events (~5?10?), and even after gating the number of dots is too >> great. Details are lost, and the size of the PDF output is huge. >> >> What I'd like to do is restrict the plot to a certain number of >> events e.g. 1?10?. This doesn't appear to be directly possible >> with xyplot. Can a flowFrame be trimmed down to a certain number >> of events, such as the first 1?10?? Due to gating, I can't gate on >> the event count because this won't give me /n/ events because the >> numbers aren't continuous. >> >> >> Many thanks, >> Roger Leigh >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > Davide Rambaldi, Bioinformatics PostDoc. > ----------------------------------------------------- > IFOM-IEO Campus > Via Adamello 16, Milano > I-20139 Italy > [t] +39 02574303870 > [e] davide.rambaldi at ifom-ieo-campus.it > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
On Tue, Mar 01, 2011 at 07:49:40AM -0800, Finak, Greg wrote: Thank you both for your suggestions. Doing it when reading the flow data in is too early; we don't know at this point which lines we need. To do it this way would require reading each file twice, and repeating for each gating operation after we worked out which rows we needed from the initial gating. I've gone with this approach: limit <- function (frame, limit=10000) { frame at exprs <- frame at exprs[1:min(limit,nrow(frame at exprs)),] frame } filtset <- fsApply(set, limit, limit=15000) Which does the job nicely, and can be done following all gating to ensure that one gets at most the limit=n number of events. It could probably be made more reliable by picking the events randomly or evenly interspersed through the run to avoid any biases over time. I'm aware that subsampling is not always advisable. For the data I'm plotting, this isn't a problem however. I would prefer to use the defaults of xyplot, but I'm afraid these are proving to be somewhat controversial amongst the majority of the flow users in our group, necessitating reproduction of what the existing software used for flow analysis can do. Ironically, their argument is the same as yours-- that the plots are hiding detail for low frequency events(!) Thanks, Roger > Subsampling your data for plotting runs the risk of losing details in rwgioms > of low density (i.e. rare events). Another option would be to use contour > plots of the density estimate (if I recall correctly, flowViz does support > this) or simply pass smooth=TRUE. > > On 2011-03-01, at 7:46 AM, "Davide Rambaldi" <davide.rambaldi at="" ifom-ieo-campus.it=""> wrote: > > > I am still practicing with flowCore, but what about this?: > > > > lines <- sample(100:500, 50) > > y <- read.FCSfile.name, which.lines=sample) > > > > On Mar 1, 2011, at 4:34 PM, Roger Leigh wrote: > >> > >> I'm using xyplot with smooth=FALSE, outline=TRUE to get a plain > >> dotplot. Unfortunately, some of my data has a great deal of > >> events (~5?10?), and even after gating the number of dots is too > >> great. Details are lost, and the size of the PDF output is huge. > >> > >> What I'd like to do is restrict the plot to a certain number of > >> events e.g. 1?10?. This doesn't appear to be directly possible > >> with xyplot. Can a flowFrame be trimmed down to a certain number > >> of events, such as the first 1?10?? Due to gating, I can't gate on > >> the event count because this won't give me /n/ events because the > >> numbers aren't continuous.
ADD REPLY

Login before adding your answer.

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