annotateWithGeneParts {genomation} | R Documentation

## Annotate given object with promoter, exon, intron and intergenic regions

### Description

The function annotates `GRangesList` or `GRanges` object as overlapping with promoter,exon,intron or intergenic regions.

### Usage

    annotateWithGeneParts(target, feature, strand = FALSE,
      intersect.chr = FALSE)

    ## S4 method for signature 'GRanges,GRangesList'
    annotateWithGeneParts(target, feature,
      strand = FALSE, intersect.chr = FALSE)

    ## S4 method for signature 'GRangesList,GRangesList'
    annotateWithGeneParts(target, feature,
      strand = FALSE, intersect.chr = FALSE)

### Arguments

`target` | `GRanges` or `GRangesList` object storing chromosome locations to be annotated (e.g. chipseq peaks)
`feature` | GRangesList object containing GRanges object for promoter, exons, introns and transcription start sites, or simply output of readTranscriptFeatures function
`strand` | If set to TRUE, annotation features and target features will be overlapped based on strand (def:FALSE)
`intersect.chr` | boolean, whether to select only chromosomes that are common to feature and target. FALSE by default

### Value

`AnnotationByGeneParts` object or a list of `AnnotationByGeneParts` objects if target is a `GRangesList` object.

### Examples

    data(cage)
    bed.file = system.file("extdata/chr21.refseq.hg19.bed", package = "genomation")
    gene.parts = readTranscriptFeatures(bed.file)
    cage.annot = annotateWithGeneParts(cage, gene.parts, intersect.chr=TRUE)
    cage.annot

[Package genomation version 1.12.0 Index]