determine_anchor_overlap {idr2d} | R Documentation

## Identifies Overlapping Anchors

### Description

Identifies all overlapping anchor pairs (m:n mapping).

### Usage

    determine_anchor_overlap(rep1_anchor, rep2_anchor, max_gap = -1L)

### Arguments

`rep1_anchor` | data frame with the following columns:
column 1: | `chr` | character; genomic location of anchor in replicate 1 - chromosome (e.g., `"chr3"`)
column 2: | `start` | integer; genomic location of anchor in replicate 1 - start coordinate
column 3: | `end` | integer; genomic location of anchor in replicate 1 - end coordinate
`rep2_anchor` | data frame with the following columns:
column 1: | `chr` | character; genomic location of anchor in replicate 2 - chromosome (e.g., `"chr3"`)
column 2: | `start` | integer; genomic location of anchor in replicate 2 - start coordinate
column 3: | `end` | integer; genomic location of anchor in replicate 2 - end coordinate
`max_gap` | integer; maximum gap in nucleotides allowed between two anchors for them to be considered as overlapping (defaults to -1, i.e., overlapping anchors)

### Value

A data frame containing overlapping anchor pairs with the following columns:

column 1: | `rep1_idx` | anchor index in data frame `rep1_anchor`
column 2: | `rep2_idx` | anchor index in data frame `rep2_anchor`

### Examples

    rep1_df <- idr2d:::chiapet$rep1_df
    rep2_df <- idr2d:::chiapet$rep2_df

    rep1_anchor_a <- data.frame(chr = rep1_df[, 1],
                                start = rep1_df[, 2],
                                end = rep1_df[, 3])
    rep2_anchor_a <- data.frame(chr = rep2_df[, 1],
                                start = rep2_df[, 2],
                                end = rep2_df[, 3])

    anchor_a_overlap <- determine_anchor_overlap(rep1_anchor_a, rep2_anchor_a)

[Package idr2d version 1.6.0 Index]