# 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)
Run the code above in your browser using DataLab