Learn R Programming

genomation (version 1.4.2)

getFeatsWithTargetsStats: Get the percentage/count of annotation features overlapping with target features from AnnotationByFeature

Description

This function retrieves percentage/number of annotation features overlapping with targets. For example, if AnnotationByFeature object is containing statistics of differentially methylated regions overlapping with gene annotation. This function will return number/percentage of introns,exons and promoters overlapping with differentially methylated regions.

Usage

getFeatsWithTargetsStats(x,percentage=TRUE)

## S3 method for class 'AnnotationByFeature': getFeatsWithTargetsStats(x, percentage = TRUE)

Arguments

x
a AnnotationByFeature object
percentage
TRUE|FALSE. If TRUE percentage of annotation features will be returned. If FALSE, number of annotation features will be returned

Value

  • RETURNS a vector of percentages or counts showing quantity of annotation features overlapping with target features

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)
getFeatsWithTargetsStats(cage.annot)

Run the code above in your browser using DataLab