Learn R Programming

metagenomeSeq (version 1.14.0)

plotOrd: Plot of either PCA or MDS coordinates for the distances of normalized or unnormalized counts.

Description

This function plots the PCA / MDS coordinates for the "n" features of interest. Potentially uncovering batch effects or feature relationships.

Usage

plotOrd(obj, tran = TRUE, comp = 1:2, norm = TRUE, log = TRUE, usePCA = TRUE, useDist = FALSE, distfun = stats::dist, dist.method = "euclidian", n = NULL, ...)

Arguments

obj
A MRexperiment object or count matrix.
tran
Transpose the matrix.
comp
Which components to display
norm
Whether or not to normalize the counts - if MRexperiment object.
log
Whether or not to log2 the counts - if MRexperiment object.
usePCA
TRUE/FALSE whether to use PCA or MDS coordinates (TRUE is PCA).
useDist
TRUE/FALSE whether to calculate distances.
distfun
Distance function, default is stats::dist
dist.method
If useDist==TRUE, what method to calculate distances.
n
Number of features to make use of in calculating your distances.
...
Additional plot arguments.

Value

coordinates

See Also

cumNormMat

Examples

Run this code

data(mouseData)
cl = pData(mouseData)[,3]
plotOrd(mouseData,tran=TRUE,useDist=TRUE,pch=21,bg=factor(cl),usePCA=FALSE)

Run the code above in your browser using DataLab