get_binned_coverage {spiky} | R Documentation

## tabulate read coverage in predefined bins

### Description

refactored out of scan_spiked_bam

### Usage

    get_binned_coverage(bins, covg)

### Arguments

`bins` | the GRanges with bins
`covg` | the coverage result (an RleList)

### Value

       a GRanges of summarized coverage

### See Also

      get_spiked_coverage

      scan_spiked_bam

### Examples

    sb <- system.file("extdata", "example.spike.bam", package="spiky",
                       mustWork=TRUE)
    data(spike,package="spiky")
    si <- seqinfo_from_header(sb)
    genome(si) <- "spike"
    mgr <- get_merged_gr(si,spike=spike)
    fl <- scanBamFlag(isDuplicate=FALSE, isPaired=TRUE, isProperPair=TRUE)
    bp <- ScanBamParam(flag=fl)
    bamMapqFilter(bp) <- 20

    covg <- get_spiked_coverage(sb, bp=bp, gr=mgr)
    get_binned_coverage(bins=GRanges(), covg=covg)

[Package spiky version 1.0.0 Index]