plotBsVolcano: Volcano style plot

View source: R/differentialPlots.R

plotBsVolcanoR Documentation

Volcano style plot

Description

Wrapper that plots differential binding results as volcano plot. For each binding site the estimated fold-change (log2) is shown on X and the adjusted P value (-log10) is shown on Y.

Usage

plotBsVolcano(object, what = c("bs", "bg"), sig.threshold = 0.05)

Arguments

object

a BSFDataSet object with results calculated by calculateBsFoldChange

what

character; whether to show results for binding sites or the background (one of: 'bs', 'bg')

sig.threshold

numeric; what P value significance level to use (default = 0.05)

Value

a plot of type ggplot

See Also

calculateBsFoldChange

Examples

# load clip data
files <- system.file("extdata", package="BindingSiteFinder")
load(list.files(files, pattern = ".rda$", full.names = TRUE))
load(list.files(files, pattern = ".rds$", full.names = TRUE)[1])

# make testset
bds = makeBindingSites(bds, bsSize = 7)
bds = assignToGenes(bds, anno.genes = gns)
bds = imputeBsDifferencesForTestdata(bds)
bds = calculateBsBackground(bds, anno.genes = gns, use.offset = FALSE)

# use all filters and remove binding sites that fail (default settings)
bds = filterBsBackground(bds)

# calculate fold-changes
bds = calculateBsFoldChange(bds)

# make volcano plot
plotBsVolcano(bds)


ZarnackGroup/BindingSiteFinder documentation built on May 31, 2024, 3:29 a.m.