fetchBam {seqsetvis}R Documentation

fetch a bam file pileup with the ability to consider cross strand correlation

Description

fetch a bam file pileup with the ability to consider cross strand correlation

Usage

fetchBam(bam_f, qgr, fragLen = NULL, target_strand = c("*", "+", "-")[1],
  ...)

Arguments

bam_f

character or BamFile to load

qgr

GRanges regions to fetchs

fragLen

numeric, NULL, or NA. if numeric, supplied value is used. if NULL, value is calculated with fragLen_calcStranded if NA, raw bam pileup with no cross strand shift is returned.

target_strand

character. if one of "+" or "-", reads are filtered to match. ignored if any other value.

...

passed to ScanBamParam(), can't be which or what.

Value

GRanges containing tag pileup values in score meta column. tags are optionally extended to fragment length (fragLen) prior to pile up.

Examples

bam_file = system.file("extdata/test.bam", package = "seqsetvis")
qgr = CTCF_in_10a_overlaps_gr[1:5]
fetchBam(bam_file, qgr)
fetchBam(bam_file, qgr, fragLen = 180, target_strand = "+")

[Package seqsetvis version 1.0.2 Index]