annotateWithFeature {genomation} | R Documentation

## Function to annotate given GRanges object with a given genomic feature

### Description

Function to annotate given GRanges object with a given genomic feature

### Usage

    annotateWithFeature(target, feature, strand = FALSE, extend = 0,
      feature.name = NULL, intersect.chr = FALSE)

    ## S4 method for signature 'GRanges,GRanges'
    annotateWithFeature(target, feature,
      strand = FALSE, extend = 0, feature.name = NULL,
      intersect.chr = FALSE)

### Arguments

`target` | a GRanges object storing chromosome locations to be annotated
`feature` | a GRanges object storing chromosome locations of a feature (can be CpG islands, ChIP-seq peaks, etc)
`strand` | If set to TRUE, annotation features and target features will be overlapped based on strand (def:FAULT)
`extend` | specifiying a positive value will extend the feature on both sides as much as `extend`
`feature.name` | name of the annotation feature. For example: H3K4me1,CpGisland etc. by default the name is taken from the given variable
`intersect.chr` | boolean, whether to select only chromosomes that are common to feature and target. FALSE by default

### Value

returns an `AnnotationByFeature` object

### Examples

    data(cpgi)
    data(promoters)
    annot = annotateWithFeature(cpgi, promoters)

[Package genomation version 1.12.0 Index]