assignToTranscriptRegions: Assign binding sites to their hosting transcript regions

assignToTranscriptRegionsR Documentation

Assign binding sites to their hosting transcript regions

Description

Function that assigns each binding site in the BSFDataSet to its hosting transcript region given an annotation database (anno.annoDB), or a GRanges list / CompressedGRangesList (anno.transcriptRegionList) that holds the ranges for the transcript regions of interest.

Usage

assignToTranscriptRegions(
  object,
  overlaps = c("frequency", "hierarchy", "flag", "remove"),
  overlaps.rule = NULL,
  anno.annoDB = NULL,
  anno.transcriptRegionList = NULL,
  normalize.exclude.upper = 0.02,
  normalize.exclude.lower = 0.02,
  quiet = FALSE
)

Arguments

object

a BSFDataSet object with stored binding sites. This means that ranges should be > 1

overlaps

character; how overlapping transcript regions should be handled.

overlaps.rule

character vector; a vector of transcript region names that should be used to handle overlapping cases in a hierarchical manor. The order of the vector is the order of the hierarchy.

anno.annoDB

an object of class OrganismDbi that contains the transcript region annotation (!!! Experimental !!!).

anno.transcriptRegionList

an object of class CompressedGRangesList that holds an ranges for each transcript region

normalize.exclude.upper

numeric; percentage value that indicates the upper boundary for transcript region length to be considered when calculating normalization factors for regions.

normalize.exclude.lower

numeric; percentage value that indicates the lower boundary for transcript region length to be considered when calculating normalization factors for regions.

quiet

logical; whether to print messages

Details

Since the assignment is based on the overlaps of annotated transcript ranges and binding sites, no matching meta data is needed.

In the case of transcript regions overlaps are very frequent. To resolve these cases the overlaps argument can be used. Option 'frequency' will take the most frequently observed transcript region, option 'hierarchy' works in conjunction with a user defined rule (overlaps.rule). Options 'flag' and 'remove' will label binding sites with an ambiguous tag or remove all overlapping cases, respectively.

The function is part of the standard workflow performed by BSFind.

Value

an object of class BSFDataSet with binding sites having hosting transcript region information added to their meta columns.

See Also

BSFind, transcriptRegionOverlapsPlot, transcriptRegionSpectrumPlot

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 = makeBindingSites(object = bds, bsSize = 9)
bds = assignToGenes(bds, anno.genes = gns)
bds = assignToTranscriptRegions(object = bds, anno.transcriptRegionList = regions)


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