Skip to contents

Plots fitted melting curves.

Usage

X.plot.meltcurves(
  data = NULL,
  fits = NULL,
  samples = NA,
  replicates = NA,
  color.col = "Sample",
  pointshape.col = "Replicate",
  colors = "rainbow",
  points = c(16, 17, 18, 8, 4, 3, 9, 10, 11, 12, 13, 14),
  fit.length = 100,
  pdf.export = TRUE,
  pdf.folder = ".",
  pdf.name = "MCcurves"
)

Arguments

data

Data frame or list of data frames: Scaled data with removed outliers and fitting statistics, ideally $data output from X.scale.meltcurves.

fits

List containing all fit objects, ideally $fits output from X.meltcurve.fit. The list must be named and the names must correspond to id column values of the data. Alternatively, a list of such lists of same length as the lenght of the list of data.

samples

Character vector: names of samples in the same order as the list of data. NA if only one data frame.

replicates

Character vector: names of replicates in the same order as the list of data. NA if only one data frame.

color.col

Character string: Which column of the data frame(s) should be used for color scaling?

pointshape.col

Character string: Which column of the data frame(s) should be used for point shape definition?

colors

Character vector: "rainbow" will plot curves from red to violet across sample. "distinct" will use preset distinct color scheme. User can also define a vector of colors.

points

Integer vector: numbers that define point types used for plotting.

fit.length

Integer: How many points should be used for fitting curves. Default is 100 which is sufficient for plotting.

pdf.export

Logical: If TRUE (default), a pdf with all plots will be exported.

pdf.folder

Character string: Name of the directory for pdf export. Default is the working directory.

pdf.name

Character string: Name of the exported pdf file. Default is 'MCcurves'

Value

A list of melting curve plots.

Examples

MCdata.plotted <- X.plot.meltcurves(all.sdata %>% unlist(recursive=FALSE),all.fits %>% unlist(recursive=FALSE), samples=rep(c("tp28","tp40"),each=3),replicates=c(1,2,3,1,2,3))
#> Error in all.sdata %>% unlist(recursive = FALSE): could not find function "%>%"