dot-calc_stranded_coverage: Calculate coverage per strand

Description Usage Arguments Value Examples

Description

Calculate coverage per strand

Usage

1
.calc_stranded_coverage(reads_dt, query_gr, window_size = 1)

Arguments

reads_dt

data.table containing read spans. mandatory columns are which_label, strand, start, end

query_gr

GRanges of regions of interest

window_size

resolution used to represent coverage. window_size of 10 retrieves coverage every 10 bp.

Value

data.table containing stranded read coverage

Examples

1
2
3
4
5
bam_file = system.file("extdata", "MCF10A_CTCF.random5.bam", package = "peakrefine")
np = system.file("extdata", "MCF10A_CTCF.random5.narrowPeak", package = "peakrefine")
qgr = rtracklayer::import(np, format = "narrowPeak")
bam_dt = peakrefine:::.fetch_bam_stranded(bam_file, qgr)
cov_dt = peakrefine:::.calc_stranded_coverage(bam_dt, qgr)

jrboyd/peakrefine documentation built on July 30, 2020, 7:13 p.m.