annotateAnchors {diffloop} | R Documentation |
annotateAnchors
adds a logical variable to meta data columns in the
anchors based on a GRanges object of features' genomic coordinates
annotateAnchors(dlo, features, featureName, maxgap) ## S4 method for signature 'loops,GRanges,character,missing' annotateAnchors(dlo, features, featureName, maxgap = 1000) ## S4 method for signature 'loops,GRanges,character,numeric' annotateAnchors(dlo, features, featureName, maxgap)
dlo |
A loops object whose anchors will be annotated |
features |
A Granges object corresponding to locations of interest |
featureName |
A string that will be the mcol name in anchors |
maxgap |
A value of max permissible gap between a feature and anchor |
This function adds column of TRUE/FALSE values on the loops object
anchors whether a feature is observed nearby in features
. The name
of this column that will be in the anchors GRanges object is specified by
a user defined string featureName
. Gap tolerance between a feature
and an anchor is specified by maxgap
, where the default is 1,000bp.
A loops object with new meta data column in anchors
# Annotate whether anchors are near a gene body; within 1kb rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/') load(rda) gb <-getHumanGenes() loops.small <- annotateAnchors(loops.small,gb,'nearGeneBody') # Adding close to gene bodies with no gap tolerance loops.small <- annotateAnchors(loops.small,gb,'inGeneBody',0)