Learn R Programming

Glimma (version 1.0.0)

glMDPlot: Glimma MD Plot

Description

Draw an interactive MD plot

Usage

glMDPlot(x, ...)

Arguments

x
the data.frame containing data to plot.
...
additional arguments affecting the plots produced. See specific methods for detailed arguments.

Value

Draws a two-panel interactive MD plot in an html page. The left plot shows the log-fold-change vs average expression. The right plot shows the expression levels of a particular gene of each sample.

See Also

glMDPlot.default, glMDPlot.DGELRT, glMDPlot.DGEExact, glMDPlot.MArrayLM, glMDPlot.DESeqDataSet

Examples

Run this code
library(limma)
library(edgeR)

data(lymphomaRNAseq)
x <- lymphomaRNAseq

sel <- rowSums(cpm(x$counts)>0.5)>=3
x <- x[sel,]

genotype <- relevel(x$samples$group, "Smchd1-null")
x <- calcNormFactors(x, method="TMM")
des <- model.matrix(~genotype)

## Apply voom with sample quality weights and fit linear model
v <- voomWithQualityWeights(x, design=des, normalization="none", plot=FALSE)
vfit <- lmFit(v,des)

## Apply treat relative to a fold-change of 1.5
vtfit <- treat(vfit,lfc=log2(1.5))
vfit <- eBayes(vfit)
results <- decideTests(vfit,p.value=0.01)


glMDPlot(vfit, counts=x$counts, anno=x$genes, groups=genotype, samples=1:7,
         status=results[,2], main="MD plot: Wild-type vs Smchd1",
         display.columns=c("Symbols", "GeneID", "GeneName"),
         folder="Smchd1-Lymphoma")


Run the code above in your browser using DataLab