lolaVolcanoPlot: lolaVolcanoPlot

Description Usage Arguments Value Author(s) Examples

View source: R/lolaUtils.R

Description

plot a volcano plot showing LOLA enrichment results: LOLA p-value against the log-odds score. Colored by rank

Usage

1
2
3
4
5
6
7
8
lolaVolcanoPlot(
  lolaDb,
  lolaRes,
  includedCollections = c(),
  signifCol = "qValue",
  colorBy = "maxRnk",
  colorpanel = c()
)

Arguments

lolaDb

LOLA DB object as returned by LOLA::loadRegionDB or loadLolaDbs

lolaRes

LOLA enrichment result as returned by the runLOLA function from the LOLA package

includedCollections

vector of collection names to be included in the plot. If empty (default), all collections are used

signifCol

column name of the significance score in lolaRes. Should be one of c("pValueLog", "qValue").

colorBy

annotation/column in the the LOLA DB that should be used for point coloring

colorpanel

colors to be used for coloring the points

Value

ggplot object containing the plot

Author(s)

Fabian Mueller

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
# compute differential methylation
dm <- rnb.execute.computeDiffMeth(rnb.set.example,pheno.cols=c("Sample_Group","Treatment"))
# download LOLA DB
lolaDest <- tempfile()
dir.create(lolaDest)
lolaDirs <- downloadLolaDbs(lolaDest, dbs="LOLACore")
# perform enrichment analysis
res <- performLolaEnrichment.diffMeth(rnb.set.example,dm,lolaDirs[["hg19"]])
# select the 500 most hypermethylated tiling regions in ESCs compared to iPSCs
# in the example dataset
lolaRes <- res$region[["hESC vs. hiPSC (based on Sample_Group)"]][["tiling"]]
lolaRes <- lolaRes[lolaRes$userSet=="rankCut_500_hyper",]
# plot
lolaVolcanoPlot(res$lolaDb, lolaRes, signifCol="qValue")

RnBeads documentation built on March 3, 2021, 2 a.m.