Learn R Programming

genomation (version 1.4.2)

annotateWithFeatureFlank: Function to annotate a given GRanges object with promoter,exon,intron & intergenic values

Description

Function to annotate a given GRanges object with promoter,exon,intron & intergenic values

Usage

annotateWithFeatureFlank(target, feature, flank, feature.name = NULL,
  flank.name = "flank", strand = FALSE, intersect.chr = FALSE)

## S3 method for class 'GRanges,GRanges,GRanges': annotateWithFeatureFlank(target, feature, flank, feature.name = NULL, flank.name = "flank", strand = FALSE, 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)
flank
a granges object storing chromosome locations of the flanks of the feature
feature.name
string for the name of the feature
flank.name
string for the name of the flanks
strand
If set to TRUE, annotation features and target features will be overlapped based on strand (def:FAULT)
intersect.chr
boolean, whether to select only chromosomes that are common to feature and target. FALSE by default

Value

  • returns an AnnotationByFeature object

Examples

Run this code
data(cpgi)
data(cage)
cpgi.flanks = getFlanks(cpgi)
flank.annot = annotateWithFeatureFlank(cage, cpgi, cpgi.flanks)

Run the code above in your browser using DataLab