plotCtPCA {HTqPCR}R Documentation

PCA for qPCR Ct values.

Description

Perform and plot a principal component analysis for high-throughput qPCR data from any platform, for doing clustering.

Usage

plotCtPCA(q, s.names, f.names, scale = TRUE, features = TRUE, col, cex = c(1, 1))

Arguments

q

a matrix or an object of class qPCRset containing Ct values.

s.names

character vector, names of samples. See details.

f.names

character vector, names of features. See details.

scale

logical, should the variables be scaled to have unit variance. Passed on to prcomp.

features

logical, should the features be plotted. See details.

col

vector, the colours to use for the samples if features=FALSE.

cex

vector of length 2, the expansion to use for features and samples respectively if features=FALSE.

Details

Per default the sample names from the qPCRset are used, however the feature names are replaced by "*" to avoid cluttering the plot.

If features=TRUE then a biplot including all features is produced, with samples represented by vectors. I.e. both observations and variables are plotted, which can potentially be used to identify outliers among the features. For features=FALSE only the samples will be included in the plot. This might be more useful for clustering.

In case of high-throughput arrays, some samples may be all NAs. These are ignored during the PCA calculation.

Value

A plot is created on the current graphics device.

Note

This is still a work in progress, and the function is not particularly sophisticated. Suggestions/wishes are welcome though.

Author(s)

Heidi Dvinge

See Also

prcomp, biplot

Examples

# Load example data
data(qPCRraw)
# Plot
plotCtPCA(qPCRraw)
# Include feature names; make them smaller
plotCtPCA(qPCRraw, f.names=featureNames(qPCRraw), cex=c(0.5,1))
# Plot only the samples
plotCtPCA(qPCRraw, features=FALSE)

[Package HTqPCR version 1.48.0 Index]