plotBsMA: MA style plot

View source: R/differentialPlots.R

plotBsMAR Documentation

MA style plot

Description

Wrapper that plots differential binding results as MA plot. For each binding site the estimated baseMean (log2) is shown on X and the fold-change (log2) is shown on Y.

Usage

plotBsMA(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 MA plot
plotBsMA(bds)


ZarnackGroup/BindingSiteFinder documentation built on Nov. 24, 2024, 10:41 a.m.