Learn R Programming

maftools (version 0.99.30)

addReadCounts: add read counts to MAF file from bam files.

Description

add read counts to MAF file from bam files.

Usage

addReadCounts(maf, bam_df, BaseQuality = 10, MapQuality = 10,
  ref_genome = NULL, skipSamples = NULL, samples = NULL, prefix = NULL,
  add = TRUE)

Arguments

maf

an MAF object generated by read.maf

bam_df

two column dataframe. First column must contain Tumor_Sample_Barcode and second column with path to corresponding bam file.

BaseQuality

minimum base quality.

MapQuality

minimum mapping quality.

ref_genome

path to reference genome. required.

skipSamples

Tumor_Sample_Barcodes to skip from bam_df.

samples

add read counts to only these samples.

prefix

Prefix to add or remove from contig names in MAF file.

add

If prefix is used, default is to add prefix to contig names in MAF file. If false prefix will be removed from contig names.

Value

maf file with "t_depth", "t_ref_count", "t_alt_count" and "t_vaf" columns added.

Details

This is a wrapper script which runs bam-readcount programme via R system() command to get readcounts. Assumes bam-readcount is installed and under path. Make sure chromosome names in 'Chromosome' field of maf matches to chromosome names in reference fasta file. Currently only supports for SNPs. Indels will be populated with NA.