[BioC] FlowViz xyplot event limit

Roger Leigh rleigh at codelibre.net
Fri Mar 4 16:30:43 CET 2011


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.FCS(file.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.



More information about the Bioconductor mailing list