Description Usage Arguments Details Value See Also Examples
Computes the absolute distance between the midpoint of each x
interval and
the midpoints of each closest y
interval.
1  bed_absdist(x, y, genome)

x 

y 

genome 

Absolute distances are scaled by the interreference gap for the
chromosome as follows. For Q
query points and R
reference
points on a chromosome, scale the distance for each query point i
to
the closest reference point by the interreference gap for each chromosome.
If an x
interval has no matching y
chromosome,
.absdist
is NA
.
d_i(x,y) = min_k(q_i  r_k)\frac{R}{Length\ of\ chromosome}
Both absolute and scaled distances are reported as .absdist
and
.absdist_scaled
.
Interval statistics can be used in combination with
dplyr::group_by()
and dplyr::do()
to calculate
statistics for subsets of data. See vignette('intervalstats')
for
examples.
tbl_interval()
with .absdist
and .absdist_scaled
columns.
http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002529
Other interval statistics: bed_fisher
,
bed_jaccard
, bed_projection
,
bed_reldist
1 2 3 4 5 6  genome < read_genome(valr_example('hg19.chrom.sizes.gz'))
x < bed_random(genome, seed = 1010486)
y < bed_random(genome, seed = 9203911)
bed_absdist(x, y, genome)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.