scaledWindowPositions {ORFik} | R Documentation |
For example scale a coverage plot of a all human CDS to width 100
scaledWindowPositions(grl, reads, scaleTo = 100, scoring = "meanPos")
grl |
GRangesList or GRanges of your ranges |
reads |
GRanges object of your reads. |
scaleTo |
an integer (100), if windows have different size, a meta window can not directly be created, since a meta window must have equal size for all windows. Rescale all windows to scaleTo. i.e c(1,2,3) -> size 2 -> c(1, mean(2,3)) etc. Can also be a vector, 1 number per grl group. |
scoring |
a character, one of (meanPos, sumPos) |
Nice for making metaplots, the score will be mean of merged positions.
A data.table with scored counts (counts) of reads mapped to positions (position) specified in windows along with frame (frame).
Other coverage: coverageScorings
,
metaWindow
,
windowPerReadLength
library(GenomicRanges) windows <- GRangesList(GRanges("chr1", IRanges(1, 200), "-")) x <- GenomicRanges::GRanges( seqnames = "chr1", ranges = IRanges::IRanges(c(1, 100, 199), c(2, 101, 200)), strand = "-") scaledWindowPositions(windows, x, scaleTo = 100)