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

View source: R/plotOrd.R

plotOrdR Documentation

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


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


HCBravoLab/metagenomeSeq documentation built on March 17, 2024, 3:21 p.m.