subMDS: MDS plot with class labels

Description Usage Arguments Details Value Examples

View source: R/subMDS.R

Description

Multi-dimensional scaling (MDS) plot with class labels. Wrapper for plotMDS.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
subMDS(
  emat,
  class = NULL,
  keepN = TRUE,
  nGenes = 1000,
  normMethod = NULL,
  dim = c(1, 2),
  labelSamp = FALSE,
  labelCenters = TRUE,
  classConfusion = NULL,
  legend = "bottomleft",
  classCol = getOption("subClassCol"),
  ...
)

Arguments

emat

a numeric matrix with row features and sample columns.

class

a factor vector specifying subtypes compared length(class)==ncol(emat).

keepN

a logical or numeric vector specifying which samples to keep (defaults to all).

nGenes

an integer specifying number of features to used for MDS

normMethod

a character, passed to calcNormFactors if element in c("TMM","RLE", "upperquartile","none") or voom ("scale", "quantile", "cyclicloess").

dim

a numeric vector of length 2, specifying which principal components to plot.

labelSamp

a logical indicating whether points (FALSE) or colnames(emat) are plotted.

labelCenters

a logical indicating whether class centers should be labeled.

classConfusion

a factor vector with same length and levels as class specifying alternative classifications.

legend

a character specifying legend placement (e.g. "topleft", "bottomright").

classCol

a character vector of hexcolors with length(classCol)>=levels(class). If NULL, a pre-defined RColorBrewer based palette is used.

...

arguments to be passed to plotMDS.

Details

plotMDS provides a MDS plot of emat with points colored according to class labels. If classConfusion is specified, samples where class != classConfusion are highlighted.

Value

A labeled MDS plot

Examples

1
2
3
4
# sample subset for reduced run-time
subset <- 25:50
subMDS(emat=crcTCGAsubset, class=crcTCGAsubset$CMS,
        keepN=subset, normMethod="quantile")

peterawe/CMScaller documentation built on June 13, 2020, 4:49 a.m.