View source: R/differentialPlots.R
plotBsBackgroundFilter | R Documentation |
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.
plotBsBackgroundFilter(
object,
filter = c("minCounts", "balanceBackground", "balanceCondition")
)
object |
a |
filter |
character; which filter to display in the plot (one of: 'minCounts', 'balanceBackground', 'balanceCondition') |
a plot of type ggplot
calculateBsBackground
filterBsBackground
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.