utilsScoreOverlaps {CAGEfightR} | R Documentation

## Utility: Counting overlaps taking into account scores

### Description

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

### Usage

    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

    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)

[Package CAGEfightR version 1.14.0 Index]