Description Usage Arguments Value Examples
Converts a GRanges to a GPos, correctly expanding the score column. This is useful is nearby CTSSs with the same count are grouped in the same range (see example).
1 | convertGRanges2GPos(object)
|
object |
GRanges object with a score column |
GPos with score column
1 2 3 4 5 6 7 8 9 10 11 12 | # Example GRanges
gr <- GRanges(Rle(c("chr2", "chr2", "chr3", "chr4")),
IRanges(start=c(1, 10, 5, 3),
end=c(5L, 10L, 5L, 4L)),
strand="+",
score=c(2, 1, 3, 11))
# Expand to proper GPos / CTSS format:
gp <- convertGRanges2GPos(gr)
# Double check that the total number of counts remains the same
stopifnot(sum(score(gr) * width(gr)) == sum(score(gp)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.