keepCTCFloops {diffloop} | R Documentation |
keepCTCFloops
returns loops that are nearby CTCF peaks
as determined by some external data in a GRanges object
keepCTCFloops(lto, ctcf) ## S4 method for signature 'loops,GRanges' keepCTCFloops(lto, ctcf)
lto |
A loops object whose loops will be annotated |
ctcf |
GRanges object corresponding to locations of CTCF peaks |
This function works similar to the annotateLoops
function but
returns only CTCF loops that are defined in this function.
However, loops in annotateLoops
may have a different annotation
based on their priority scheme. For example, an e-p loop from
annotateLoops
may be returned as a CTCF loop by this function
if the loop had both annotations. These peaks don't necessarily
need to be CTCF peaks, so using a GRanges object with enhancers
or promoters to determine e-e loops and p-p loops could also
be used in this function
A loops object with all loops having both anchors in the GRanges region
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/') load(rda) ctcf_j <- system.file('extdata','Jurkat_CTCF_chr1.narrowPeak',package='diffloop') ctcf <- rmchr(padGRanges(bedToGRanges(ctcf_j), pad = 1000)) # small.ctcf <- keepCTCFloops(loops.small, ctcf)