glimmaMDS {Glimma} | R Documentation

## Glimma MDS Plot

### 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:

- `glimmaMDS.DGEList` for edgeR analysis

- `glimmaMDS.DESeqDataSet` for DESeq2 analysis

- `glimmaMDS.default` for all other object types

### Usage

    glimmaMDS(x, ...)

### 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

    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)

[Package Glimma version 2.0.0 Index]