plotCtPCA: PCA for qPCR Ct values.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/plotCtPCA.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
# 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)

Example output

Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: RColorBrewer
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

Warning message:
In read.dcf(con) :
  URL 'http://bioconductor.org/BiocInstaller.dcf': status was 'Couldn't resolve host name'

HTqPCR documentation built on Nov. 8, 2020, 6:51 p.m.