annotateGRanges {BiSeq} | R Documentation

## 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).

### Details

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

### Value

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

### Author(s)

Katja Hebestreit

### See Also

`GRanges-class`

### Examples

    # 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

[Package BiSeq version 1.34.0 Index]