maplot: Plots MA plot for the Hodges lab

Description Usage Arguments Examples

Description

This function reads a data frame either directly from the results output of DESeq2, or by importing a table saved directly from such a result data frame.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
maplot(
  res,
  foldthresh = log2(1.5),
  pthresh = 0.1,
  colpal_unch = "greys",
  colpal_incr = "oranges",
  colpal_decr = "blues",
  minCount = 0,
  ylim = c(-2.25, 2.25),
  label = F,
  maxlabel = 50,
  grid = F,
  box = T,
  ...
)

Arguments

res

Results data frame from DESeq2. Important fields are "id", "baseMean", "log2FoldChange", "padj", and "label".

foldthresh

Threshold for calling changes in either direction based on fold change. Defaults to log2(1.5).

pthresh

Threshold for calling changes in either direction based on padj. Defaults to 0.10.

colpal_unch

Color palette for unchanged sites, options from LSD::disco(). Defaults to "greys".

colpal_incr

Color palette for increased sites, options from LSD::disco(). Defaults to "oranges".

colpal_decr

Color palette for decreased sites, options from LSD::disco(). Defaults to "blues".

minCount

Minimum x value to plot. Defaults to 0.

ylim

Two-element vector setting the y-axis limits. Defaults to c(-2.25,2.25).

label

Variable describing how or if labeling should occur. Can be TRUE, FALSE, or "auto". Defaults to FALSE.

maxlabel

Indicates maximum number of labels to place on the plot. Only is evaluated when label == TRUE. Defaults to 50.

grid

Boolean describing whether to show major gridlines. Defaults to FALSE.

box

Boolean describing whether to place a box around the plot area. Defaults to TRUE.

Examples

1
maplot(res)

hodgeslab/hodgeslabR documentation built on Aug. 6, 2021, 5:10 a.m.