Same plot as plot.ddpcr_plate
but with a few extra
features that are specific to PNPP experiments The main additions are that
the negative frequency of each well can be written in each well, and well
background colours can be used to differentiate between wells with a
significant negative cluster vs wells with mostly positive drops. Take a look
at plot.ddpcr_plate
to see all supported parameters
and more information.
# S3 method for pnpp_experiment
plot(
x,
wells,
samples,
...,
col_drops_negative = "purple3",
col_drops_positive = "green3",
col_drops_rain = "black",
show_negative_freq = TRUE,
text_size_negative_freq = 4,
alpha_drops_low_negative_freq = 0.5,
show_low_high_neg_freq = TRUE,
bg_negative = "purple3",
bg_positive = "green3",
alpha_bg_low_high_neg_freq = 0.1,
superimpose = FALSE,
show_drops = TRUE,
drops_size = 1
)
A ggplot2 plot object.
A ddPCR plate.
Only plot selected wells. Supports range notation, see
subset.ddpcr_plate
.
Only plot selected samples.
Parameters to pass to plot.ddpcr_plate
.
The colour to use for negative droplets.
See 'Droplet visibility options' for plot.ddpcr_plate
.
The colour to use for positive droplets.
See 'Droplet visibility options' for plot.ddpcr_plate
.
The colour to use for rain droplets.
See 'Droplet visibility options' for plot.ddpcr_plate
.
If TRUE
, show the negative frequency
as a percentage on each well.
Text size of the printed negative frequencies.
Transparency of negative droplets in wells with mostly positive droplets. In wells where there are very few negative droplets, it might be useful to make them more visible by increasing their transparency.
Differentiate between wells with a high vs low negative frequency by having a different background colour to the well.
The background colour for wells that have a significant negative cluster.
The background colour for wells that have mostly positive drops.
The transparency value for bg_negative
and bg_positive
.
If TRUE
, show all wells superimposed in one plot;
otherwise, show wells in a grid.
Whether or not to show the droplets. Setting to FALSE
is not useful if the droplets are the only thing shown in the plot, but it
can be useful if there is other information depicated in the plot, such as
any background colours or text that may appear in each well.
Size of droplets.
plot.ddpcr_plate
pnpp_experiment
if (FALSE) {
plate <- new_plate(sample_data_dir(), type = plate_types$pnpp_experiment)
positive_dim(plate) <- "Y"
plot(plate)
plate <- plate %>% analyze
plot(plate)
plot(plate, "A01:C05", col_drops_rain = "blue")
}
Run the code above in your browser using DataLab