collapse.by.scores: Merge reads by sum of existing scores

Description Usage Arguments Value Examples

View source: R/utils_collapse.R

Description

If you have multiple reads a same location but different read lengths, specified in meta column "size", it will sum up the scores (number of replicates) for all reads at that position

Usage

1

Arguments

x

a GRanges object

Value

merged GRanges object

Examples

1
2
3
4
5
6
7
gr_s1 <- rep(GRanges("chr1", 1:10,"+"), 2)
gr_s2 <- GRanges("chr1", 1:12,"+")
gr2 <- GRanges("chr1", 21:40,"+")
gr <- c(gr_s1, gr_s2, gr2)
res <- convertToOneBasedRanges(gr,
   addScoreColumn = TRUE, addSizeColumn = TRUE)
ORFik:::collapse.by.scores(res)

ORFik documentation built on March 27, 2021, 6 p.m.