keepEPloops {diffloop} | R Documentation

## Keep enhancer-promoter loops

### Description

`keepEPloops` adds a column to the rowData slot of a loops object that shows the corresponding TSS of a gene name based on the promoter GRanges. The loops object is then subsetted and returns only loops that are enhancer-promoter.

### Usage

    keepEPloops(lto, enhancer, promoter)

    ## S4 method for signature 'loops,GRanges,GRanges'
    keepEPloops(lto, enhancer, promoter)

### Arguments

`lto` | A loops object whose loops will be annotated
`enhancer` | GRanges object corresponding to locations of enhancer peaks
`promoter` | GRanges object corresponding to locations of promoter regions

### Details

This function works similar to the `annotateLoops` function but returns only enhancer-promoter loops that are defined in this function. Additionally, this function returns the gene name(s) of the nearby transcription start sites in a comma-separted list if there are multiple. These gene names are defined by the promoter GRanges mcol slot.

### Value

A loops object with an additional row 'loop.type' in the rowData slot in addition to the gene.tss (which has the gene name) and the anchor.tss which shows the anchor(s) near the promoter region for the gene.

### Examples

    rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
    load(rda)
    h3k27ac_j <- system.file('extdata','Jurkat_H3K27ac_chr1.narrowPeak',package='diffloop')
    h3k27ac <- rmchr(padGRanges(bedToGRanges(h3k27ac_j), pad = 1000))
    promoter <- padGRanges(getHumanTSS(c('1')), pad = 1000)
    # small.ep <- keepEPloops(loops.small, h3k27ac, promoter)

[Package diffloop version 1.14.0 Index]