bindingSiteDefinednessPlot: Binding site definedness plot

View source: R/PlotFunction.R

bindingSiteDefinednessPlotR Documentation

Binding site definedness plot

Description

Binding site definedness is given by the percent of crosslinks that fall diretly inside the binding site compare to those around the binding site. This plotting function shows the distribution of those percentage values grouped by what is indicated in the by argument.

Usage

bindingSiteDefinednessPlot(
  object,
  by = c("all", "transcript_region", "gene_type"),
  showN.genes = 5,
  show.others = FALSE
)

Arguments

object

a BSFDataSet object

by

character; the option by which the plot should be grouped by. Options are: "all", "transcript_region", "gene_type"

showN.genes

numeric; if by is 'gene_type', then this argument set the maximum number of groups to be shown in the plot

show.others

logical; whether to show 'others' category.

Details

If by = 'all', then all binding site are grouped into one distribution. For options 'transcript_region' and 'gene_type' binding sites are split into groups according to the respective assignment. This requires that the respective assignment function was executed on the dataset prior to calling this plot function.

Value

a plot of type ggplot

See Also

BSFind, calculateSignalToFlankScore

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])
load(list.files(files, pattern = ".rds$", full.names = TRUE)[2])
bds = BSFind(bds, anno.genes = gns, anno.transcriptRegionList = regions,
 est.subsetChromosome = "chr22")
bds = calculateSignalToFlankScore(bds)
bindingSiteDefinednessPlot(bds)


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