plot-bg function

Plot bg objects

Plot bg objects

Draws diagnostic plots of amplification reaction.

## S4 method for signature 'bg' plot(x, what = 1:3, add = FALSE, indicators = TRUE, legend = TRUE, stan.labs = TRUE, plot.colors = c("black", "red", "blue"), ...)

Arguments

  • x: is a bg object.
  • what: is a vector specifying what should be plotted. 1 means raw data, 2 means first derivative and 3 means second derivative. Any combination of mentioned values is valid, for example: c(1,2), c(1, 2, 3), c(2, 3). See Details and Examples.
  • add: is a "logical" argument. If TRUE, plot is added to existing plot. Moreover, enforces indicators = FALSE.
  • indicators: is a "logical" argument. If FALSE, background start, stop and plateau transition indication lines aren't plotted.
  • legend: is a "logical" argument. If TRUE, legend is added to the plot.
  • stan.labs: is a "logical" argument. If TRUE, standard axis labels ("Cycle" and "Fluorescence") are added.
  • plot.colors: is a vectors of colors used in plot. Must have length 3.
  • ...: Arguments to be passed further to the plot function, such as graphical parameters.

Details

plot.bg is simplified, ready-to-use version of plot.der, which still can be used whenever more flexible function is needed.

Author(s)

Stefan Roediger, Michal Burdukiewicz

See Also

bg, plot.der

Examples

#step-by-step plotting bg object res <- AmpSim(cyc = 1:40, Cq = 25) background <- bg.max(res) plot(background) #above is equivalent of below plot(rounder(inder(res)), xlab = "Cycles", ylab = "Fluorescence", pch = 20, legend = FALSE) abline(v = slot(background, "bg.start")) text(slot(background, "bg.start"), 0.2, "Background start", pos = 4) abline(v = slot(background, "bg.stop"), col = "blue") text(slot(background, "bg.stop"), 0.25, "Background stop", pos = 4, col = "blue") abline(v = slot(background, "amp.stop"), col = "green") text(slot(background, "amp.stop"), 0.3, "Plateau transition", pos = 4, col = "green") legend(4, 1, c("Raw data", "First derivative", "Second derivative"), pch = rep(20, 3), col = c(1, 2, 4))
  • Maintainer: Stefan Roediger
  • License: GPL-3
  • Last published: 2021-03-05