get_mutations_read_counts: Counts ref and alt reads for a set of mutations

Description Usage Arguments Details Value See Also Examples

View source: R/get_mutations_read_counts.R

Description

Counts ref and alt reads for a set of mutations in a bam file

Usage

1
2
get_mutations_read_counts(mutations, bam, tag = "",
  min_base_quality = 20, max_depth = 1e+05, min_mapq = 30)

Arguments

mutations

A data frame with the reporter mutations. Should have the columns CHROM, POS, REF, ALT.

bam

path to bam file

tag

the RG tag if the bam has more than one sample

min_base_quality

minimum base quality for a read to be counted

max_depth

maximum depth above which sampling will happen

min_mapq

the minimum mapping quality for a read to be counted

Details

Quantifies the reference and variant alleles for the input mutations in the input bam file. Useful for forced calling mutations.

Value

a named list contains: ref, vector of read counts of the reference alleles, and alt, vector of read counts of the alternative allele

See Also

get_mutations_read_names test_ctDNA get_mutations_fragment_size

Examples

1
2
3
data("mutations", package = "ctDNAtools")
bamT1 <- system.file("extdata", "T1.bam", package = "ctDNAtools")
get_mutations_read_counts(mutations = mutations[1:3, ], bam = bamT1)

ctDNAtools documentation built on March 26, 2020, 7:39 p.m.