bed_reldist | R Documentation |
Compute relative distances between intervals.
bed_reldist(x, y, detail = FALSE)
x |
ivl_df |
y |
ivl_df |
detail |
report relative distances for each |
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.
If detail = FALSE
, a ivl_df that summarizes
calculated .reldist
values with the following columns:
.reldist
relative distance metric
.counts
number of metric observations
.total
total observations
.freq
frequency of observation
If detail = TRUE
, the .reldist
column reports the relative
distance for each input x
interval.
https://bedtools.readthedocs.io/en/latest/content/tools/reldist.html
Other interval statistics:
bed_absdist()
,
bed_fisher()
,
bed_jaccard()
,
bed_projection()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.