plotCtLines {HTqPCR} | R Documentation

## Plotting Ct values from qPCR across multiple samples.

### Description

This function is for displaying a set of features from a qPCRset across multiple samples, such as a timeseries or different treatments. Values for each feature are connected by lines, and the can be averaged across groups rather than shown for individual smaples.

### Usage

    plotCtLines(q, genes, groups, col = brewer.pal(10, "Spectral"), xlab = "Sample", ylab = "Ct", legend = TRUE, lwd = 2, lty, pch, xlim, ...)

### Arguments

`q` | object of class qPCRset.
`genes` | numeric or character vector, selected genes to make the plot for.
`groups` | vector, the different groups that the samples in `q` belong to. See details.
`col` | vector, colours to use for the lines.
`xlab` | character string, label for the x-axis.
`ylab` | character string, label for the y-axis.
`legend` | logical, whether to include a colour legend or not.
`lwd` | numeric, the width of the lines.
`lty` | vector, line types to use. See `par` or `lines` for details.
`pch` | vector, if `groups` is set, the point types that will be used for each feature in `genes`.
`xlim` | vector of length two, the limits for the x-axis. Mainly used for adjusting the position of the legend.
`...` | any other arguments will be passed to the `matplot` function.

### Details

The default plot shows the Ct values across all samples in `q`, with lines connecting the samples. However, if `groups` is set the Ct values will be averaged within groups. Lines connect these averages, but the individual values are shown with different point types, as chosen in `pch`.

### Value

A plot is created on the current graphics device.

### Author(s)

Heidi Dvinge

### See Also

`matplot`

### Examples

    # Load some example data
    data(qPCRraw)
    samples <- exFiles <- read.delim(file.path(system.file("exData", package="HTqPCR"), "files.txt"))
    # Draw dfferent plots
    plotCtLines(qPCRraw, genes=1:10)
    plotCtLines(qPCRraw, genes=1:10, groups=samples$Treatment, xlim=c(0,3))
    feat <- as.numeric(as.factor(featureType(qPCRraw)[1:10]))
    plotCtLines(qPCRraw, genes=1:10, col=feat)

[Package HTqPCR version 1.36.0 Index]