Description Usage Arguments Details Value Author(s) Examples
View source: R/peakreference.R
This function merges genomic coordinates of a given data frame or reads in BED files (e.g. generated from a peak caller) under given directory and merge genomic regions that have overlapping genomic intervals into a single feature. The single feature represents the widest genomic interval that covers all merged regions.
1 2 |
data |
a data frame containg coordinates information of peaks to be merged. Columns of the data frame should be consistent with the BED format where the first column is the name of the chromosome, the second column is the starting position and the third column is the ending position. |
dir |
character string giving the directory where BED files
are stored. If |
pattern |
an |
merge |
logical indicating whether to merge overlapped regions or not. If False, regions are simply combined. |
overlap |
a numberic value giving the least number of base(s) two regions should overlap when merging them. |
ratio |
a numberic value giving the thresold of overlapping
ratio between two regions to merge them. See ' |
The overlapping ratio (OR) is defined as:
OR = \frac{n}{\min(length(a), length(b)}
a, b are two genomic regions, n is the number of overlapping bases between region a and region b.
a data frame with four columns: chr
, start
,
stop
, id
Mengjun Wu, Lei Gu
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.