Description Usage Arguments Value Examples
Calculates the distance in nucleotides between the midpoints of two peaks.
Note: peaks must be on the same chromosome; start coordinate is always less than end coordinate
| 1 | calculate_midpoint_distance1d(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 | 
positive integer vector; distances between peak pairs
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # identical, zero distance
calculate_midpoint_distance1d(100, 120,
                          100, 120)
# centered, zero distance
calculate_midpoint_distance1d(100, 120,
                          90, 130)
# off by 10 per anchor
calculate_midpoint_distance1d(100, 120,
                         110, 130)
# vectorized example
calculate_midpoint_distance1d(c(100, 100, 100),
                          c(120, 120, 120),
                          c(100, 90, 110),
                          c(120, 130, 130))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.