varcount: Wrapper around applyPileups

varcountR Documentation

Wrapper around applyPileups

Description

Takes in vector of bam paths or GRanges corresponding to sites / territories to query, and outputs a list with fields:

$counts = 3D matrix of base counts (A, C, G, T, N) x sites x bams subject to mapq and baseq thresholds

varcount() relies upon varbase()

Usage

varcount(
  bams,
  gr,
  min.mapq = 0,
  min.baseq = 20,
  max.depth = 500,
  indel = FALSE,
  ...
)

Arguments

bams

character vector of paths to bam files

gr

GRanges of (width=1) sites i.e. intervals at which to compute base coujnts

min.mapq

integer Minimal mapping quality at which to compute bases (default = 0)

min.baseq

integer Minimal base quality at which to compute bases (default = 20)

max.depth

integer Maximum read depth to consider (default = 500)

indel

boolean Flag whether to consider indels (default = FALSE)

...

other args be passed to read.bam(). Please see documentation for read.bam()

Value

GRanges annotated with fields $alt.count.t, $ref.count.t, $alt.count.n, $ref.count.n

Author(s)

Marcin Imielinski


mskilab/bamUtils documentation built on Sept. 28, 2022, 3:45 p.m.