plotDisp: Function plotDisp

Description Usage Arguments Value Author(s) Examples

Description

Creates an edgeR dispersion plot for RNA-Seq QC purposes. Takes a counts matrix or DGEList for input. Dispersion is plotted against AveLogCPM. Optionally, you can plot Biological Coefficient of Variation instead (BCV is the sqrt of dispersion).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
plotDisp(
  x,
  designMatrix,
  plotType = "dispersion",
  symbolSize = 1,
  symbolShape = 1,
  symbolColor = "darkblue",
  symbolFill = "darkblue",
  symbolAlpha = 0.3,
  linefitSize = 1,
  linefitColor = "yellow",
  lineFit = NULL,
  lineType = 1,
  lineAlpha = 1,
  rugColor = NULL,
  rugAlpha = 0.02,
  ...
)

Arguments

x

A Counts matrix or DGEList (required)

designMatrix

A design matrix created stats::model.matrix

plotType

One of "dispersion" or "BCV" (default = "dispersion")

symbolSize

(Default=1)

symbolShape

see http://www.cookbook-r.com/Graphs/Shapes_and_line_types/ (Default = 1)

symbolColor

Default = "darkblue"

symbolFill

Default = "darkblue"

symbolAlpha

Transparency for the points. Value from 0 to 1. Smaller indicate more transparency (Default = 0.3)

linefitSize

(Default = 1)

linefitColor

(Default = "yellow")

lineFit

(Default = NULL) Any type supported by geom_smooth (loess is recommended). Defaults to NULL because enabling this overloads my poor 32bit PC.

rugColor

(Default = NULL) Set to Null to disable rug plots. Note: printing plots with rug plots can be slow (several minutes on my meager 32bit pc). So I left this disabled by default. Assign a valid color to enable

rugAlpha

Transparency for the rug plots (Default = 0.02)

...

Extra parameters to pass to edgeR::estimateDisp

Value

a ggplot object

Author(s)

John Thompson, jrt@thompsonclan.org

Examples

1
2
   MyGgplot <- plotDisp (MyDGElist)
   MyGgplot <- plotDisp (MyDGEobj)

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.