glimmaMDS.DESeqDataSet {Glimma} | R Documentation

## Glimma MDS Plot

### Description

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

### Usage

    ## S3 method for class 'DESeqDataSet'
    glimmaMDS(
      x,
      groups = as.data.frame(SummarizedExperiment::colData(x)),
      labels = rownames(SummarizedExperiment::colData(x)),
      continuous.colour = FALSE,
      top = 500,
      gene.selection = c("pairwise", "common"),
      prior.count = 2,
      html = NULL,
      width = 900,
      height = 500,
      ...
    )

### Arguments

`x` | `DESeqDataSet` object containing gene 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.DGEList`

### Examples

    dge <- readRDS(system.file("RNAseq123/dge.rds", package = "Glimma"))
    dds <- DESeq2::DESeqDataSetFromMatrix(
     countData = dge$counts,
     colData = dge$samples,
     rowData = dge$genes,
     design = ~group
    )
    glimmaMDS(dds)

[Package Glimma version 2.0.0 Index]