plotBsBackgroundFilter: Diagnostic plots for the differential binding background

View source: R/differentialPlots.R

plotBsBackgroundFilterR Documentation

Diagnostic plots for the differential binding background

Description

To perform differential binding analysis between two conditions the calculateBsBackground function groups crosslinks per gene into those from binding sites and those from background regions. The filterBsBackground function perfroms certain filtering operations on that background to ensure that it's suitable for differential testing. This function visually displays the effect of these filtering operations.

Usage

plotBsBackgroundFilter(
  object,
  filter = c("minCounts", "balanceBackground", "balanceCondition")
)

Arguments

object

a BSFDataSet object with background counts filtered by filterBsBackground

filter

character; which filter to display in the plot (one of: 'minCounts', 'balanceBackground', 'balanceCondition')

Value

a plot of type ggplot

See Also

calculateBsBackground

filterBsBackground

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)

# display minCount filter
plotBsBackgroundFilter(bds, filter = "minCounts")

# display balance background filter
plotBsBackgroundFilter(bds, filter = "balanceBackground")

# display balance condition filter
plotBsBackgroundFilter(bds, filter = "balanceCondition")


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