find_distance: Find the distance between peaks and regions

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Calculate the distance between the elements of two GRanges objects.

Usage

1
find_distance(peaks, regions, how = "center")

Arguments

peaks

A GRanges object

regions

A GRanges object

how

A character string, default 'center'

Value

A vector of integers

Examples

1
2
3
4
5
library(IRanges)

query <- IRanges(c(1, 4, 9), c(5, 7, 10))
subject <- IRanges(c(2, 2, 10), c(2, 3, 12))
find_distance(query, subject)

target documentation built on Nov. 8, 2020, 5:28 p.m.