plotCtOverview {HTqPCR} | R Documentation

## Overview plot of qPCR Ct values across multiple conditions.

### Description

Function for high-throughput qPCR data, for showing the average Ct values for features in a barplot, either for individual samples or averaged across biological or technical groups. If Ct values are shown, error bars can be included, or the Ct values can be displayed relative to a calibrator sample.

### Usage

    plotCtOverview(q, cards = TRUE, genes, groups, calibrator, replicates = TRUE, col, conf.int = FALSE, legend = TRUE, ...)

### Arguments

`q` | object of class qPCRset.
`cards` | integer, the cards (samples) to use. Defaults to all.
`genes` | vector selecting the features to show. See Details.
`groups` | vector with groups to average the samples across. If missing all the samples are displayed individually. See Details.
`calibrator` | the value in `groups` to use as calibrator sample. See Details.
`replicates` | logical, if should values from replicated features in each sample be collapsed or kept separate.
`col` | colours to use for each sample or group. Per default a maximum of 10 colours are used, so this parameter should be set if more than 10 groups are present.
`conf.int` | logical, should the 95 percent confidence interval be shown. See Details.
`legend` | logical, should a legend be included in the plot.
`...` | further arguments passed to `barplot`.

### Details

If a calibrator is chosen all values will be displayed relative to this, i.e. as Ct(sample)-Ct(calibrator). If there is no calibrator, the full Ct values are shown, including 95% confidence interval if selected. For confidence intervals when there is a calibrator, it's the variation across Ct(sample)-average(Ct(calibrator)) that is shown.

When setting `replicates=TRUE` it is often better to specify `genes` by name rather than selecting for example the first 10 features using 1:10. This literally only takes the first 10 rows of the data, although some of these features might be replicated elsewhere in the data.

The purpose of `group` is to tell plotCtOverview if any of the samples should be treated as biological replicates, in addition to the technical replicates that might be present on each plate. With e.g. 4 samples and `groups=c("A", "B", "C", "D")` they're each treated individually, and only replicates features on each plate are considered. However, `groups=c("WT", "WT", "WT", "mutant")` means that the first 3 are treated as biological replicates; hence for each gene in the barplot there'll be one bar for WT and one for mutant.

### Value

A figure is produced in the current graphics device.

### Author(s)

Heidi Dvinge

### Examples

    # Load example data
    data(qPCRraw)
    exPath <- system.file("exData", package="HTqPCR")
    samples <- read.delim(file.path(exPath, "files.txt"))
    # Show all samples for the first 10 genes
    g <- featureNames(qPCRraw)[1:10]
    plotCtOverview(qPCRraw, genes=g, xlim=c(0,90))
    plotCtOverview(qPCRraw, genes=g, xlim=c(0,50), groups=samples$Treatment)
    plotCtOverview(qPCRraw, genes=g, xlim=c(0,60), groups=samples$Treatment, conf.int=TRUE, ylim=c(0,55))
    # Relative to a calibrator sample
    plotCtOverview(qPCRraw, genes=g, groups=samples$Treatment, calibrator="Control")
    plotCtOverview(qPCRraw, genes=g, groups=samples$Treatment, calibrator="Control", conf.int=TRUE, ylim=c(-0.5,0.5))
    plotCtOverview(qPCRraw, genes=g, groups=samples$Treatment, calibrator="LongStarve")

[Package HTqPCR version 1.44.0 Index]