bed_reldist: Compute relative distances between intervals.

Description Usage Arguments Details Value See Also Examples

View source: R/bed_reldist.r

Description

Compute relative distances between intervals.

Usage

1
bed_reldist(x, y, detail = FALSE)

Arguments

x

tbl_interval()

y

tbl_interval()

detail

report relative distances for each x interval.

Details

Interval statistics can be used in combination with dplyr::group_by() and dplyr::do() to calculate statistics for subsets of data. See vignette('interval-stats') for examples.

Value

If detail = FALSE, a tbl_interval() that summarizes calculated .reldist values with the following columns:

If detail = TRUE, the .reldist column reports the relative distance for each input x interval.

See Also

http://bedtools.readthedocs.io/en/latest/content/tools/reldist.html

Other interval statistics: bed_absdist, bed_fisher, bed_jaccard, bed_projection

Examples

1
2
3
4
5
6
7
8
genome <- read_genome(valr_example('hg19.chrom.sizes.gz'))

x <- bed_random(genome, seed = 1010486)
y <- bed_random(genome, seed = 9203911)

bed_reldist(x, y)

bed_reldist(x, y, detail = TRUE)

rnabioco/valr documentation built on Jan. 6, 2019, 9:06 a.m.