annotate.WithFeature-methods: Annotate object with a set of genomic features

Description Usage Arguments Value See Also Examples

Description

The function annotates given genomic feature or methylKit object with a set of annotation. It is primarily useful when annotating objects with simple genomic features, such as enhancer locations.

Usage

1
  annotate.WithFeature(target,feature,strand=FALSE,extend=0,feature.name="feat1")

Arguments

target

a methylDiff or 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:FALSE)

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.

Value

returns an annotationByFeature object

See Also

getMembers, getTargetAnnotationStats, getFeatsWithTargetsStats, plotTargetAnnotation

Examples

1
2
3
4
data(methylKit)
cpg.gr=read.bed(system.file("extdata", "cpgi.hg18.bed.txt", package = "methylKit"),remove.unsual=TRUE)

annotate.WithFeature(methylDiff.obj,cpg.gr,strand=FALSE,extend=0,feature.name="CpGi")

fortunatobianconi/methylkit documentation built on May 16, 2019, 1:51 p.m.