Description Usage Arguments Details Value See Also Examples
View source: R/coverage_helpers.R
For example scale a coverage table of a all human CDS to width 100
1 2 3 4 5 6 7 8 | scaledWindowPositions(
grl,
reads,
scaleTo = 100,
scoring = "meanPos",
weight = "score",
is.sorted = FALSE
)
|
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) |
weight |
(default: 'score'), if defined a character name of valid meta column in subject. GRanges("chr1", 1, "+", score = 5), would mean score column tells that this alignment region was found 5 times. ORFik .bedo files, contains a score column like this. As do CAGEr CAGE files and many other package formats. You can also assign a score column manually. |
is.sorted |
logical (FALSE), is grl sorted. That is + strand groups in increasing ranges (1,2,3), and - strand groups in decreasing ranges (3,2,1) |
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()
,
regionPerReadLength()
,
windowPerReadLength()
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.