Skip to contents

Computes maximum coverage from a BigWig file over specified genomic regions using region-specific BigWigSelection import. Uses na.rm = TRUE for robustness with potentially missing data.

Usage

maxCovBwCached(bw_path, gr)

Arguments

bw_path

Character string path to BigWig file

gr

GenomicRanges object containing regions

Value

Numeric value representing the maximum coverage across the regions

Examples

bw_path <- make_example_bigwig()
gr <- GenomicRanges::GRanges(
  "chr1", IRanges::IRanges(1000L, 2000L)
)
max_cov <- maxCovBwCached(bw_path, gr)
file.remove(bw_path)
#> [1] TRUE