get_binned_coverage: tabulate read coverage in predefined bins

View source: R/get_binned_coverage.R

get_binned_coverageR 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)


trichelab/spiky documentation built on Sept. 17, 2022, 8:44 a.m.