plot.aovBioCond: Plot an 'aovBioCond' Object

View source: R/diffTest.R

plot.aovBioCondR Documentation

Plot an aovBioCond Object


Given an aovBioCond object, which records the results of calling differential genomic intervals across a set of bioCond objects, this method creates a scatter plot of (conds.mean, log10( pairs from all genomic intervals, marking specifically the ones that show a statistical significance. See aovBioCond for a description of the two variables and the associated hypothesis testing. The mean-variance curve associated with the bioCond objects is also added to the plot, serving as a baseline to which the variable of each interval could be compared.


## S3 method for class 'aovBioCond'
  padj = NULL,
  pval = NULL,
  col = alpha(c("black", "red"), 0.04),
  pch = 20,
  xlab = "Mean",
  ylab = "log10(Var)",
  args.legend = list(x = "bottomleft"),
  args.lines = list(col = "green3", lwd = 2),



An object of class "aovBioCond", typically a returned value from aovBioCond.

padj, pval

Cutoff of adjusted/raw p-value for selecting significant intervals. Only one of the two arguments is effectively used; pval is ignored if padj is specified. The default is equivalent to setting padj to 0.1.

col, pch

Optional length-2 vectors specifying the colors and point characters of non-significant and significant intervals, respectively. Elements are recycled if necessary.

xlab, ylab

Labels for the X and Y axes.


Further arguments to be passed to legend.


Further arguments to be passed to lines.


Further arguments to be passed to plot.


The function returns NULL.

See Also

bioCond for creating a bioCond object; fitMeanVarCurve for fitting a mean-variance curve for a set of bioCond objects; aovBioCond for calling differential intervals across multiple bioConds.


data(H3K27Ac, package = "MAnorm2")
attr(H3K27Ac, "metaInfo")

## Call differential genomic intervals among GM12890, GM12891 and GM12892
## cell lines and visualize the overall analysis results.

# Perform MA normalization and construct bioConds to represent the cell
# lines.
norm <- normalize(H3K27Ac, 4, 9)
norm <- normalize(norm, 5:6, 10:11)
norm <- normalize(norm, 7:8, 12:13)
conds <- list(GM12890 = bioCond(norm[4], norm[9], name = "GM12890"),
              GM12891 = bioCond(norm[5:6], norm[10:11], name = "GM12891"),
              GM12892 = bioCond(norm[7:8], norm[12:13], name = "GM12892"))
autosome <- !(H3K27Ac$chrom %in% c("chrX", "chrY"))
conds <- normBioCond(conds, common.peak.regions = autosome)

# Variations in ChIP-seq signals across biological replicates of a cell line
# are generally of a low level, and their relationship with the mean signal
# intensities is expected to be well modeled by the presumed parametric
# form.
conds <- fitMeanVarCurve(conds, method = "parametric", occupy.only = TRUE)
plotMeanVarCurve(conds, subset = "occupied")

# Perform a moderated ANOVA on these cell lines.
res <- aovBioCond(conds)

# Visualize the overall analysis results.
plot(res, padj = 1e-6)

MAnorm2 documentation built on Oct. 29, 2022, 1:12 a.m.