annotateLoops.dge {diffloop} | R Documentation

## Annotate enhancer-promoter loops with differential gene expression

### Description

`annotateLoops.dge` adds columns to the rowData slot of a loops object that shows summary statistics corresponding TSS of a gene name based on the genes.tss rowData column. This function should be used following the `keepEPloops` function.

### Usage

    annotateLoops.dge(lto, deseq_res, multiple = FALSE)

    ## S4 method for signature 'ANY'
    annotateLoops.dge(lto, deseq_res, multiple = FALSE)

### Arguments

`lto` | A loops object whose loops will be annotated
`deseq_res` | A data.frame
`multiple` | Annotate loops with multiple TSS? Default = FALSE

### Details

This function links enhancer-promoter loops and differential gene expression results. The rownames of the deseq_res slots should correspond to the gene names in the gene.tss column of the rowData slot of the loops object. The function returns a loops object if multiple is specified as FALSE which is the case by default. Otherwise, if multiple is TRUE, then this function returns a data frame since each loop may have more than moe TSS. One can reproduce this dataframe quickly when multiple = FALSE using the summary() function on the returned loops object.

### Value

A loops object if multiple = FALSE or data frame if multiple = TRUE

### 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)
    #ADD SOMETHING HERE.

[Package diffloop version 1.18.0 Index]