glimmaMDS.DGEList: Glimma MDS Plot

Description Usage Arguments Details Value See Also Examples

View source: R/glimmaMDS.R

Description

Draws a two-panel interactive MDS plot using a DGEList x. Transforms counts using edgeR::cpm(x, log=TRUE, prior.count = prior.count).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S3 method for class 'DGEList'
glimmaMDS(
  x,
  groups = x$samples,
  labels = rownames(x$samples),
  continuous.colour = FALSE,
  top = 500,
  gene.selection = c("pairwise", "common"),
  prior.count = 2,
  html = NULL,
  width = 900,
  height = 500,
  ...
)

Arguments

x

DGEList object containing gene counts in x$counts.

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.

prior.count

integer indicating the average count to be added to each observation to avoid taking log of zero when raw counts are transformed to log-counts-per-million values.

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.default, glimmaMDS.DESeqDataSet

Examples

1
2
dge <- readRDS(system.file("RNAseq123/dge.rds", package = "Glimma"))
glimmaMDS(dge)

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