annotateLoops {diffloop} | R Documentation

## Annotate loops as Enhancer-Promoter or CTCF-CTCF

### Description

`annotateLoops` adds a column to the rowData slot of a loops object categorizing loops as either e-p (enhancer-promoter), p-p (promoter-promoter), e-e (enhancer-enhancer), ctcf (CTCF-CTCF) or none (no biological annotation).

### Usage

    annotateLoops(lto, ctcf, enhancer, promoter)

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

    ## S4 method for signature 'loops,missing,GRanges,GRanges'
    annotateLoops(lto, ctcf, enhancer,
      promoter)

### Arguments

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

### Details

Function annotates loops where both anchors are near CTCF peaks or where one anchor is near an enhancer and the other near a promoter. Consider using functions `addchr`, `rmchr`, `bedToGRanges`, and `padGRanges` when setting up the 3 GRanges inputs. Provide a blank GRanges objects to ignore classification for one set.

### Value

A loops object with an additional row 'loop.type' in the rowData slot

### 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))
    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)
    # annotated_small <- annotateLoops(loops.small, ctcf, h3k27ac, promoter)

[Package diffloop version 1.14.0 Index]