| removeRegion {diffloop} | R Documentation |
removeRegion takes a loops object and a GRanges
object and returns a loops object where neither anchors map inside
the GRanges coordinates.
removeRegion(dlo, region) ## S4 method for signature 'loops,GRanges' removeRegion(dlo, region)
dlo |
A loops object to be subsetted |
region |
A GRanges object containing region of interest |
A loops object with no anchors touching the region given
# Remove region chr1:36000000-36100000
library(GenomicRanges)
regA <- GRanges(c('1'),IRanges(c(36000000),c(36100000)))
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
# Get rid of loop if either anchor touches that region
restricted <- removeRegion(loops.small, regA)