Question: flowViz and grid
0
gravatar for Robert Baer
2.7 years ago by
Robert Baer70
United States
Robert Baer70 wrote:

When plotting flowFrames, I sometimes get the warning, "Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'.

I have a general sense of what this is telling me in terms of the density plot, but I cannot figure out how to set the gridsize from the high order plotting function. Can anyone help point me to the right documentation or a specific syntax / work-around?

fs1 = read.flowSet(path = path, pattern = '.fcs')

> plot(fs1[[1]])
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
2: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
3: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
4: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
5: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
6: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
7: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
8: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth) :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
9: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
10: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
11: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
12: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
13: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
14: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
15: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
16: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
17: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
18: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
19: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
20: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
21: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
22: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
23: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
24: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
25: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
26: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
27: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
28: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
29: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
30: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
31: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
32: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
33: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
34: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
35: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
36: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
37: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
38: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
39: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
40: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
41: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
42: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
43: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
44: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
45: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
46: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
47: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
48: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
49: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
50: In KernSmooth::bkde2D(x, gridsize = nbin, bandwidth = bandwidth,  ... :
  Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'

ADD COMMENTlink modified 2.7 years ago by Jiang, Mike1.2k • written 2.7 years ago by Robert Baer70
Answer: flowViz and grid
1
gravatar for Jiang, Mike
2.7 years ago by
Jiang, Mike1.2k
(Private Address)
Jiang, Mike1.2k wrote:

You can increase "nbin"  (which is passed to "`gridsize"). Its default value is 64. Alternatively you can increase 'bandwidth', which normally is auto-calculated based on the data.  I wouldn't necessarily bother to fiddle with these default parameters unless the plots don't look right.

Also flowViz is going to be phase out in favor of 'ggcyto' package 

ADD COMMENTlink written 2.7 years ago by Jiang, Mike1.2k

Thanks as always for the quick feedback and suggestions.

Thanks also for mentioning the future of flowViz --> ggcyto transition.  Somehow, I've missed ggcyto up until now.  I'm trying to put so much information together (as someone completely new to flow optometry) that these sorts of tips are extremely valuable. I'm guessing the latter transitions from lattice to ggplot2 as an underlying framework from its name?. I'll be sure to give ggcyto a try.

ADD REPLYlink written 2.7 years ago by Robert Baer70

Yes. Unless you are plotting large number of samples on the same page, `ggcyto` should be sufficient for the majority of visualization tasks (e.g. 1d density, 2d hexbin, gates)

ADD REPLYlink written 2.7 years ago by Jiang, Mike1.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 156 users visited in the last hour