Description Usage Arguments Value Examples
Given a mapping between a peak and a feature as determined by the mapPeaks function, returns the proportion of the feature that is overlapped by the peak (i.e. the fraction of bases within the feature that are also within the peak). Output is 0 if peak does not overlap feature. Note that this is a helper function intended for use by the mapPeaks function; the user should NOT call this function themselves.
1 | getOverlapPercent(resultRow)
|
resultRow |
A mapping between a peak and a feature, as returned by mapPeaks (except for the final column giving overlap proportions, which are calculated here). The first 6 values give peak information (chromosome, start, end name, score, and strand), the next 6 values give feature information, and the final 2 values are peak position and distance relative to feature. |
The proportion of the given feature that is overlapped by the given peak. 0 if the feature does not overlap the peak.
1 2 3 4 5 6 7 | ## Not run:
peakAndFeature <- c("chr2", 1250, 5000, "Peak_5", 0, ".", "chr2", 1000, 2000,
"Gene_1", 0, "-", "Overlap (upstream)", 0)
overlapPercent <- getOverlapPercent(peakAndFeature)
floor(overlapPercent) == 75
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.