Learn R Programming

methylKit (version 0.99.2)

annotateWithFeatureFlank: Annotate an object with two sets of genomic features

Description

The function annotates given genomic feature or methylKit object with two sets of annotation. It is primarily useful when annotating objects with CpG islands and shores.

Usage

annotateWithFeatureFlank(target, feature, flank, feature.name = "feat",
  flank.name = "flank", strand = FALSE)

# S4 method for GRanges,GRanges,GRanges annotateWithFeatureFlank(target, feature, flank, feature.name = "feat", flank.name = "flank", strand = FALSE)

# S4 method for methylDiff,GRanges,GRanges annotateWithFeatureFlank(target, feature, flank, feature.name = "feat", flank.name = "flank", strand = FALSE)

# S4 method for methylDiffDB,GRanges,GRanges annotateWithFeatureFlank(target, feature, flank, feature.name = "feat", flank.name = "flank", strand = FALSE)

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)

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 o

strand

If set to TRUE, annotation features and target features will be overlapped based on strand (def:FALSE)

Value

returns an annotationByFeature object

See Also

getMembers, getTargetAnnotationStats, getFeatsWithTargetsStats, plotTargetAnnotation

Examples

Run this code
# NOT RUN {
data(methylKit)
cpg.obj=readFeatureFlank(system.file("extdata", "cpgi.hg18.bed.txt", 
package = "methylKit"),feature.flank.name=c("CpGi","shores"))

annotateWithFeatureFlank(methylDiff.obj,cpg.obj$CpGi,cpg.obj$shores,
feature.name="CpGi",flank.name="Shores")

# }

Run the code above in your browser using DataLab