heatPlot {twoddpcr} | R Documentation |
Using alpha transparency only, it is generally difficult to see where droplets are truly distributed and concentrated. A heat (density) plot gives a better illustration of this.
heatPlot(droplets, ch1Label = "Ch1 Amplitude", ch2Label = "Ch2 Amplitude", binwidth = 100, plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))) heatPlot(droplets, ch1Label = "Ch1 Amplitude", ch2Label = "Ch2 Amplitude", binwidth = 100, plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))) ## S4 method for signature 'data.frame' heatPlot(droplets, ch1Label = "Ch1 Amplitude", ch2Label = "Ch2 Amplitude", binwidth = 100, plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))) ## S4 method for signature 'ddpcrWell' heatPlot(droplets, ch1Label = "Ch1 Amplitude", ch2Label = "Ch2 Amplitude", binwidth = 100, plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))) ## S4 method for signature 'ddpcrPlate' heatPlot(droplets, ch1Label = "Ch1 Amplitude", ch2Label = "Ch2 Amplitude", binwidth = 100, plotLimits = list(x = c(1000, 9000), y = c(3000, 13500)))
droplets |
A data frame of droplet amplitudes, a |
ch1Label |
The label for the channel 1 target. Defaults to "Ch1 Amplitude". |
ch2Label |
The label for the channel 2 target. Defaults to "Ch2 Amplitude". |
binwidth |
The width of each hexagonal bin in the 2d heat (density) plot. Defaults to 100. |
plotLimits |
A list of 2-element vectors with names |
A heat plot as a ggplot
object.
Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk
The nice log-scaled palette was achieved using http://www.everydayanalytics.ca/2014/09/5-ways-to-do-2d-histograms-in-r.html
## Density plot of a data frame. heatPlot(KRASdata[["E03"]]) ## Density plot of a ddpcrWell object. aWell <- ddpcrWell(well=KRASdata[["E03"]]) heatPlot(aWell) ## Density plot of a ddpcrPlate object with an adjusted bin size. krasPlate <- ddpcrPlate(wells=KRASdata) heatPlot(krasPlate, binwidth=50)