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

View source: R/utils_collapse.R

collapse.by.scoresR Documentation

Merge reads by sum of existing scores

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

collapse.by.scores(x)

Arguments

x

a GRanges object

Value

merged GRanges object

Examples

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)


JokingHero/ORFik documentation built on Dec. 21, 2024, 12:01 a.m.