Learn R Programming

genomation (version 1.4.2)

annotateWithGeneParts: 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)

## S3 method for class 'GRanges,GRangesList': annotateWithGeneParts(target, feature, strand = FALSE, intersect.chr = FALSE)

## S3 method for class '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

Run this code
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

Run the code above in your browser using DataLab