Description Usage Arguments Value Examples
Calculates the overlap between anchor A of interaction 1 and anchor A of interaction 2, as well as anchor B of interaction 1 and anchor B of interaction 2. The overlap (in nucleotides) is then normalized by the length of the anchors.
1 | calculate_relative_overlap1d(peak1_start, peak1_end, peak2_start, peak2_end)
|
peak1_start |
integer vector; genomic start coordinate(s) of peak in replicate 1 |
peak1_end |
integer vector; genomic end coordinate(s) of peak in replicate 1 |
peak2_start |
integer vector; genomic start coordinate(s) of peak in replicate 2 |
peak2_end |
integer vector; genomic end coordinate(s) of peak in replicate 2 |
numeric vector; relative overlaps between peak pairs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 100% overlap
calculate_relative_overlap1d(100, 120,
100, 120)
# 50% overlap
calculate_relative_overlap1d(100, 120,
100, 110)
# negative overlap
calculate_relative_overlap1d(100, 120,
130, 140)
# larger negative overlap
calculate_relative_overlap1d(100, 120,
200, 220)
# vectorized example
calculate_relative_overlap1d(c(100, 100, 100, 100),
c(120, 120, 120, 120),
c(100, 100, 130, 200),
c(120, 110, 140, 220))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.