supportRatio: Support ratio function for BSFDataSet objects

View source: R/Functions.R

supportRatioR Documentation

Support ratio function for BSFDataSet objects

Description

Functions that computes a ratio to determine how well a given binding site with is supported by the crosslink coverage of the data. For a given BSFDataSet object binding sites are computed for each width indicated in the bsWidths vector (using the coverageOverRanges function). These coverages are compared to the coverage of regions flanking the binding sites. If not indicated in bsFlank these regions are of the same width as the binding sites.

Usage

supportRatio(object, bsWidths, bsFlank = NA, sub.chr = NA, ...)

Arguments

object

a BSFDataSet object

bsWidths

a numeric vector indicating the different binding site width to compute the ratio for

bsFlank

optional; a numeric vector of the same length as bsWidth used to specify the width of the flanking regions

sub.chr

chromosome identifier (eg, chr1, chr2) used for subsetting the BSFDataSet object.

...

further arguments passed to makeBindingSites

Details

Testing the width of 3nt for example, would result in a coverage within all 3nt wide binding sites (c1) and a coverage computed on the adjacent 3nt flanking the binding sites up- and downstream (f1, f2). Based on these numbers the ratio is computed by: c1/(1/2(f1+f2)).

The median over all ratios is reported as representative value.

Value

an object of class data.frame

Examples

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

suppressWarnings(supportRatio(bds, bsWidths = c(3,7)))


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