dot-fetch_bam_stranded: .fetch_bam_stranded

Description Usage Arguments Value Examples

Description

.fetch_bam_stranded

Usage

1
.fetch_bam_stranded(bam_f, query_gr, max_dupes = Inf, ...)

Arguments

bam_f

character. a .bam file, must have index file in same directory: .bam.bai

query_gr

GRanges, regions to retrieve reads for.

max_dupes

numeric, maximum positional duplicates allowed. See .remove_duplicates

...

additional arguments passed to ScanBamParam

Value

a tidy data.table of read pileup coverage from bam_f for regions in query_gr

Examples

1
2
3
4
5
6
7
8
bam_file = system.file("extdata",
  "MCF10A_CTCF.random5.bam", package = "peakrefine")
bam_input = system.file("extdata",
  "MCF10A_input.random5.bam", package = "peakrefine")
np = system.file("extdata",
  "MCF10A_CTCF.random5.narrowPeak", package = "peakrefine")
query_gr = rtracklayer::import(np, format = "narrowPeak")
peakrefine:::.fetch_bam_stranded(bam_file, query_gr)

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