50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

BiSeq (version 1.12.0)

annotateGRanges: Annotates a GRanges object by means of a second GRanges object

Description

Each genomic location of object is checked for overlapping with genomic ranges of regions. In case of an overlapping, this genomic location is marked as TRUE, or with the identifier of respective the regions object (if any).

Usage

annotateGRanges(object, regions, name, regionInfo)

Arguments

object
A GRanges.
regions
A GRanges.
name
A string specifying the name of the metadata column with the overlapping information to be added to object. Usually the type of the regions object, e.g. 'Promoter'.
regionInfo
OPTIONAL: A string or integer specifying the metadata column column of regions object containing the identifiers, e.g. entrez gene IDs of the promoters. If not specified, the genomic locations of object are labeled as TRUE (overlap) or FALSE (no overlap).

Value

A GRanges object similar to object containing an additional metadata column with the overlapping information.

Details

If multiple ranges of regions overlap with a genomic region in object, the identifier names of the overlapping regions are seperated by ','.

See Also

GRanges-class

Examples

Run this code
# load detected DMRs:
data(DMRs)

# annotate the DMRs with a GRanges object:
data(promoters)
DMRs.anno <- annotateGRanges(object = DMRs,
                             regions = promoters,
                             name = 'Promoter',
                             regionInfo = 'acc_no')
DMRs.anno

Run the code above in your browser using DataLab