removeRegion {diffloop} | R Documentation

## Remove region from loops object

### Description

`removeRegion` takes a `loops` object and a `GRanges` object and returns a `loops` object where neither anchors map inside the `GRanges` coordinates.

### Usage

    removeRegion(dlo, region)

    ## S4 method for signature 'loops,GRanges'
    removeRegion(dlo, region)

### Arguments

`dlo` | A loops object to be subsetted
`region` | A GRanges object containing region of interest

### Value

A loops object with no anchors touching the region given

### Examples

    # 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)

[Package diffloop version 1.14.0 Index]