Description Usage Arguments Value Author(s) Examples
There are occasions where classification algorithms fail for various reasons (such as poor choice/number of centres in k-means clustering). In these cases, it may be helpful to the user if an app draws a 'flat' plot with just one colour rather than nothing at all.
If a ddpcrWell
object is given as a parameter, plot the
droplets in the well and colour them according to a given class.
If a ddpcrPlate
object is given as a parameter,
plot the droplets in all wells and colour them according to a given class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | flatPlot(
droplets,
ch1Label = "Ch1 Amplitude",
ch2Label = "Ch2 Amplitude",
classString = ddpcr$na,
initialCentres = NULL,
selectedCentre = NULL,
plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))
)
## S4 method for signature 'data.frame'
flatPlot(
droplets,
ch1Label = "Ch1 Amplitude",
ch2Label = "Ch2 Amplitude",
classString = ddpcr$na,
initialCentres = NULL,
selectedCentre = NULL,
plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))
)
## S4 method for signature 'ddpcrWell'
flatPlot(
droplets,
ch1Label = "Ch1 Amplitude",
ch2Label = "Ch2 Amplitude",
classString = ddpcr$na,
initialCentres = NULL,
selectedCentre = NULL,
plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))
)
## S4 method for signature 'ddpcrPlate'
flatPlot(
droplets,
ch1Label = "Ch1 Amplitude",
ch2Label = "Ch2 Amplitude",
classString = ddpcr$na,
initialCentres = NULL,
selectedCentre = NULL,
plotLimits = list(x = c(1000, 9000), y = c(3000, 13500))
)
|
droplets |
A data frame of droplet amplitudes, or
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". |
classString |
The class that all droplets should be classified as.
Defaults to the |
initialCentres |
A data frame of initial centres to plot (e.g. initial
cluster centres used in the k-means). This is _not_ restricted to the class
|
selectedCentre |
An initial centre to highlight. This should be either
"NN", "PN", "NP" or "PP", but is _not_ restricted to the class 'classString'
only. If |
plotLimits |
A list of 2-element vectors with names |
A ggplot object in just one colour corresponding to
classString
.
Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Plot the data frame with no classification.
aWell <- KRASdata[["E03"]]
flatPlot(aWell)
## Take a ddpcrWell object that is mostly classified as "NN" and colour it
## as such.
aWell <- KRASdata[["H04"]]
emptiedWell <- aWell[aWell$Cluster == 1, ]
emptiedWell <- ddpcrWell(well=emptiedWell)
flatPlot(emptiedWell, classString="NN")
## Plotting all of a ddpcrPlate object works the same way.
krasPlate <- ddpcrPlate(wells=KRASdata)
flatPlot(krasPlate)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.