glimmaMDS: Glimma MDS Plot

Description Usage Arguments Details Value Examples

View source: R/glimmaMDS.R

Description

Generic function for drawing a two-panel interactive MDS plot. The function invokes the following methods which depend on the class of the first argument:

Usage

1

Arguments

x

the matrix containing the gene expressions.

...

the additional arguments affecting the plot produced. See specific methods for detailed 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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
dge <- readRDS(system.file("RNAseq123/dge.rds", package = "Glimma"))
glimmaMDS(dge)

# using DESeqDataSet
dds <- DESeq2::DESeqDataSetFromMatrix(
 countData = dge$counts,
 colData = dge$samples,
 rowData = dge$genes,
 design = ~group
)
glimmaMDS(dds)

# using matrix object
expr <- edgeR::cpm(dge, log = TRUE)
glimmaMDS(expr)

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