flowViz and grid
1
0
Entering edit mode
Robert Baer ▴ 70
@robert-baer-4660
Last seen 2.5 years ago
United States

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'

flowcore flowviz flow cytometry • 2.0k views
ADD COMMENT
1
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.1 years ago
(Private Address)

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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