keepCTCFloops {diffloop} | R Documentation

## Keep CTCF loops

### Description

`keepCTCFloops` returns loops that are nearby CTCF peaks as determined by some external data in a GRanges object

### Usage

    keepCTCFloops(lto, ctcf)

    ## S4 method for signature 'loops,GRanges'
    keepCTCFloops(lto, ctcf)

### Arguments

`lto` | A loops object whose loops will be annotated
`ctcf` | GRanges object corresponding to locations of CTCF peaks

### Details

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

### Value

A loops object with all loops having both anchors in the GRanges region

### Examples

    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)

[Package diffloop version 1.14.0 Index]