utilsScoreOverlaps: Utility: Counting overlaps taking into account scores

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

Similar to countOverlaps, but takes the score column into account.

Usage

1
utilsScoreOverlaps(query, subject, ...)

Arguments

query

same as findOverlaps/countOverlaps

subject

same as findOverlaps/countOverlaps

...

additional arguments passed to findOverlaps

Value

vector of number of overlaps weigthed by score column.

See Also

https://support.bioconductor.org/p/87736/#87758

Other Utility functions: utilsAggregateRows(), utilsDeStrand(), utilsSimplifyTxDb()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
gr1 <- GRanges(seqnames="chr1",
               ranges=IRanges(start = c(4, 9, 10, 30),
                              end = c(4, 15, 20, 31)),
               strand="+")
gr2 <- GRanges(seqnames="chr1",
               ranges=IRanges(start = c(1, 4, 15, 25),
                              end = c(2, 4, 20, 26)),
               strand=c("+"),
               score=c(10, 20, 15, 5))
countOverlaps(gr1, gr2)
utilsScoreOverlaps(gr1, gr2)

CAGEfightR documentation built on Nov. 8, 2020, 5:42 p.m.