subsetRegionAB {diffloop} | R Documentation

## Retain loops that have anchors in two specified regions

### Description

`subsetRegionAB` returns a loops object where one anchor maps to regionA and the other maps to region B

### Usage

    subsetRegionAB(dlo, regionA, regionB)

    ## S4 method for signature 'loops,GRanges,GRanges'
    subsetRegionAB(dlo, regionA, regionB)

### Arguments

`dlo` | A loops object
`regionA` | A GRanges object
`regionB` | A GRanges object

### Value

A loops object

### Examples

    # Return the width for loops
    library(GenomicRanges)
    rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
    load(rda)
    regA <- GRanges(c('1'),IRanges(c(36000000),c(36100000)))
    regB <- GRanges(c('1'),IRanges(c(36200000),c(36300000)))
    splits <- subsetRegionAB(loops.small, regA, regB)

[Package diffloop version 1.22.0 Index]