determine_anchor_overlap: Identifies Overlapping Anchors

Description Usage Arguments Value Examples

View source: R/auxiliary.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

idr2d documentation built on Nov. 8, 2020, 6:16 p.m.