glimmaXY {Glimma} | R Documentation

## Glimma XY Plot

### Description

Draws a two-panel interactive XY scatter plot.

### Usage

    glimmaXY(
      x,
      y,
      xlab = "x",
      ylab = "y",
      counts = NULL,
      groups = NULL,
      status = rep(0, length(x)),
      anno = NULL,
      display.columns = NULL,
      status.cols = c("dodgerblue", "silver", "firebrick"),
      sample.cols = NULL,
      transform.counts = c("logcpm", "cpm", "rpkm", "none"),
      main = "XY Plot",
      html = NULL,
      width = 920,
      height = 920
    )

### Arguments

`x` | numeric vector of values to plot on the x-axis of the summary plot.
`y` | numeric vector of values to plot on the y-axis of the summary plot.
`xlab` | character string for the x-axis label of summary plot.
`ylab` | character string for the y-axis label of summary plot.
`counts` | numeric matrix with `length(x)` rows containing gene expression values. This can be used to replace raw gene counts from dge$counts with transformed counts e.g. logCPM or logRPKM values.
`groups` | vector of length `ncol(counts)` representing categorisation of samples in expression plot.
`status` | vector of length `length(x)` indicating the status of each gene. A value of -1 marks a down-regulated gene, 0 marks a gene with no expression difference, and 1 marks an up-regulated gene.
`anno` | dataframe with `length(x)` rows containing gene annotations.
`display.columns` | character vector containing names of columns from `anno` from which to display in mouseover tooltips and table.
`status.cols` | vector of length 3 containing valid CSS strings for colours associated with `status` in the order of -1, 0 and 1.
`sample.cols` | character vector of length `ncol(counts)` containing valid CSS strings for colours associated with each sample to be displayed on the expression plot. If left unspecified, samples will be coloured according to `groups`.
`transform.counts` | the type of transform used on the counts log-cpm by default. `edgeR::cpm(counts, log=TRUE)`; defaults to FALSE.
`main` | character string for the main title of summary plot.
`html` | character string for naming HTML file for exportation of widget. The extension should be included in the file name e.g. "file.html".
`width` | numeric value indicating width of widget in pixels.
`height` | numeric value indicating width of height in pixels.

### Details

The summary plot on the left displays the x and y values specified. The expression plot on the right displays sample expression values for a single gene. Interactions with the htmlwidget include clicking on genes (points) in the summary plot to bring up associated sample expression values in the expression plot, as well as the summary statistics in the table below. Alternatively, users can interact with the table by clicking on genes (rows) to highlight genes in the summary plot, as well as bring up associated sample expression values in the expression plot. Briefly, other interactive features include a search box for the table, buttons to save plots and data (summary statistics and expression values), additional pop-up information when hovering on points in plots, and rescaling of the y-axis in the expression plot.

### Value

htmlwidget object or `NULL` if `html` argument is specified.

### Examples

    dge <- readRDS(
      system.file("RNAseq123/dge.rds", package = "Glimma"))
    design <- readRDS(
      system.file("RNAseq123/design.rds", package = "Glimma"))
    contr.matrix <- readRDS(
      system.file("RNAseq123/contr.matrix.rds", package = "Glimma"))

    v <- limma::voom(dge, design)
    vfit <- limma::lmFit(v, design)
    vfit <- limma::contrasts.fit(vfit, contrasts = contr.matrix)
    efit <- limma::eBayes(vfit)

    glimmaXY(efit$Amean, efit$coefficients)

[Package Glimma version 2.2.0 Index]