mergeAnchors: Combine nearby anchors into one peak

Description Usage Arguments Details Value Examples

View source: R/core.R

Description

mergeAnchors combines anchors that are within a user-defined radius

Usage

1
2
3
4
5
6
7
8
9
mergeAnchors(dlo, mergegap, selfloops = FALSE)

## S4 method for signature 'loops,numeric,missing'
mergeAnchors(dlo, mergegap,
  selfloops = FALSE)

## S4 method for signature 'loops,numeric,logical'
mergeAnchors(dlo, mergegap,
  selfloops = FALSE)

Arguments

dlo

A loops object whose anchors will be merged

mergegap

An integer value of the bp between anchors to be merged

selfloops

A logical value to either retain (T) or remove (F) resulting self-loops after merging anchors

Details

This function takes a loops object and combines nearby anchors, up to a distance specified by the mergegap. This likely will cause self loops to form (loop where the left and right anchor are the same), which can either be removed (by default) or retained with selfloops

Value

A loops object

Examples

1
2
3
4
5
6
7
# Merge anchors within 1kb of each other, keeping self loops 
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
m1kb <- mergeAnchors(loops.small, 1000, FALSE)

# Merge anchors within 1kb of each other, removing self loops by default
m1kb_unique <- mergeAnchors(loops.small, 1000)

Bioconductor-mirror/diffloop documentation built on June 1, 2017, 7:35 a.m.