glimmaMDS.default: Glimma MDS Plot

Description Usage Arguments Details Value See Also Examples

View source: R/glimmaMDS.R

Description

Draws a two-panel interactive MDS plot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Default S3 method:
glimmaMDS(
  x,
  groups = as.character(rep(1, ncol(x))),
  labels = as.character(seq_len(ncol(x))),
  continuous.colour = FALSE,
  top = 500,
  gene.selection = c("pairwise", "common"),
  html = NULL,
  width = 900,
  height = 500,
  ...
)

Arguments

x

the matrix containing the gene expressions.

groups

vector or data frame object with associated sample information such as experimental groups. The information is displayed in mouseover tooltips, and appropriate vector(s) can be used to adjust the plot using scale_by, colour_by and shape_by drop-down boxes of the widget.

labels

character vector of sample names or labels.

continuous.colour

TRUE if continuous colour schemes should be used. Defaults to FALSE where distinct colour schemes are used.

top

integer indiating number of top genes used to calculate pairwise distances.

gene.selection

character string specifying how genes are selected from the plot - "pairwise" if most variable genes are to be chosen for each pair of samples, or "common" to select the same genes for all comparisons.

html

character string for naming HTML file or exportation of widget. The extension should be included in the file name e.g. "file.hml".

width

numeric value indicating width of widget in pixels.

height

numeric value indicating width of widget in pixels.

...

additional unused arguments.

Details

The left plot shows two MDS dimensions, with sample annotations displayed on hover. The right panel contains a bar plot of the eigenvalues of each dimension. The controls beneath the plots can be used to change the dimensions being displayed, and the scale, colour and shape of points. The interactive MDS plot allows users to adjust sample points by scale, colour and shape for multiple vectors associated with sample information. This is carried out most effectively when x$samples includes an abundance of sample information, or when a data frame object is supplied to groups. If a simple character or factor vector is given to groups (with the default of continous.colour=FALSE), then sample points will have no scaling options, but can only be adjusted in colour and shape by groups and labels. Instead, if groups is a numeric vector (e.g. library size or expression level of a specific gene), then the plot can be scaled and coloured by the numeric values with continous.colour=TRUE.

Value

htmlwidget object or NULL if html argument is specified.

See Also

glimmaMDS, glimmaMDS.DGEList, glimmaMDS.DESeqDataSet

Examples

1
2
3
dge <- readRDS(system.file("RNAseq123/dge.rds", package = "Glimma"))
expr <- edgeR::cpm(dge, log = TRUE)
glimmaMDS(expr)

Glimma documentation built on Nov. 8, 2020, 6:13 p.m.