mafcount: Wrapper around varcount adapted to tumor and normal "paired"...

mafcountR Documentation

Wrapper around varcount adapted to tumor and normal "paired" bams

Description

Returns base counts for reference and alternative allele for an input tumor (and normal bam) and import MAF as a GRanges specifying substitutions

maf is a single width GRanges describing variants and field 'ref' (or 'Reference_Allele'), 'alt' (or 'Tum_Seq_Allele1') specifying reference and alt allele. maf is assumed to have width 1 and strand is ignored.

Usage

mafcount(
  tum.bam,
  norm.bam = NULL,
  maf,
  chunk.size = 100,
  verbose = TRUE,
  mc.cores = 1,
  ...
)

Arguments

tum.bam

string path to tumor sample, input to Bamfile()

norm.bam

optional string path to normal sample, input to Bamfile() (optional) (default = NULL)

maf

GRanges of imported MAF (e.g. output of read.delim or dt2gr(fread(MAF)))

chunk.size

integer Number of variants to extract from bam file at each iteration (default = 100)

verbose

logical Flag whether to print verbose output (default = TRUE)

mc.cores

integer Number of cores in mclapply (default = 1)

...

additional pparams to pass to varcount

Value

GRanges of MAF 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.