MDPlot: Mean-Dispersion Plots with Curves of Fitted Negative Binomial...

Description Usage Arguments Value Author(s) References Examples

View source: R/MDPlot.R

Description

This function makes mean-dispersion plots with curves of fitted negative binomial dispersion models. We currently consider only one group and fit an intercept-only model.

Usage

1
MDPlot(model.vec, counts, x, title=NULL)

Arguments

model.vec

a character vector specifying the names of the NB dispersion models. Currently supported include "NBP", "NBQ", "Common", "Tagwise-Common", "Tagwise-Trend" and "Trended"

counts

an m-by-n count matrix of non-negative integers. For a typical RNA-Seq experiment, this is the read counts with m genes and n samples

x

an n-by-p design matrix

title

title of the plot

Value

A ggplot object of mean-dispersion plot with fitted NB dispersion model curves.

Author(s)

Gu Mi <mig@stat.oregonstate.edu>, Yanming Di, Daniel Schafer

References

See https://github.com/gu-mi/NBGOF/wiki/ for more details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# load package
library(NBGOF)

# load data and subset for illustration
data(arab)
counts = arab[1:5000,1:3]
x = matrix(c(1,1,1), nr=3)

# specify what models to plot
model.vec=c("Common", "NBP", "NBQ", "Trended", "Tagwise-Common", "Tagwise-Trend")

# begin plotting
pl.arab = MDPlot(model.vec, counts, x, title="Mean-Dispersion Plot with Fitted Dispersion Models (Arabidopsis Data)")
print(pl.arab)

gu-mi/NBGOF documentation built on Oct. 25, 2020, 3:30 a.m.