annotateAnchors.bigwig: Add meta data column to anchors based on .bigwig

Description Usage Arguments Details Value Examples

Description

annotateAnchors.bigwig adds a numeric variable to meta data columns in the anchors slot based on a user-specified .bigwig file.

Usage

1
2
3
4
annotateAnchors.bigwig(dlo, file, FUN = mean, pad = 0)

## S4 method for signature 'ANY'
annotateAnchors.bigwig(dlo, file, FUN = mean, pad = 0)

Arguments

dlo

A loops object whose anchors will be annotated

file

A file corresponding to the bigwig of interest

FUN

A function used to combine multiple values observed in a single anchor; default is mean

pad

An integer value of to pad the anchors of the loops object; default is 0

Details

This function adds a meta data column to anchors of the specified loops object. All values from the .bigwig file that overlap with the each anchor are handled by the FUN (default is to average them) to produce a single value added to the mcols of the anchors.

Value

A loops object with new numeric meta data column in anchors

Examples

1
2
3
4
5
# Annotate whether anchors are near a gene body; within 1kb
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
gb <-getHumanGenes()
loops.small <- annotateAnchors(loops.small,gb,'nearGeneBody')

aryeelab/diffloop documentation built on May 12, 2019, 3:42 a.m.