Learn R Programming

ddpcr (version 1.15.2)

plot.pnpp_experiment: Plot a ddPCR plate of type PNPP experiment

Description

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.

Usage

# 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
)

Value

A ggplot2 plot object.

Arguments

x

A ddPCR plate.

wells

Only plot selected wells. Supports range notation, see subset.ddpcr_plate.

samples

Only plot selected samples.

...

Parameters to pass to plot.ddpcr_plate.

col_drops_negative

The colour to use for negative droplets. See 'Droplet visibility options' for plot.ddpcr_plate.

col_drops_positive

The colour to use for positive droplets. See 'Droplet visibility options' for plot.ddpcr_plate.

col_drops_rain

The colour to use for rain droplets. See 'Droplet visibility options' for plot.ddpcr_plate.

show_negative_freq

If TRUE, show the negative frequency as a percentage on each well.

text_size_negative_freq

Text size of the printed negative frequencies.

alpha_drops_low_negative_freq

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.

show_low_high_neg_freq

Differentiate between wells with a high vs low negative frequency by having a different background colour to the well.

bg_negative

The background colour for wells that have a significant negative cluster.

bg_positive

The background colour for wells that have mostly positive drops.

alpha_bg_low_high_neg_freq

The transparency value for bg_negative and bg_positive.

superimpose

If TRUE, show all wells superimposed in one plot; otherwise, show wells in a grid.

show_drops

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.

drops_size

Size of droplets.

See Also

plot.ddpcr_plate
pnpp_experiment

Examples

Run this code
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