Skip to contents

Calculates most frequent base call counts from a nx4 matrix bases. Provide ref to ignore reference base call counts.

Usage

max_observed_bc(bases, ref = NULL)

Arguments

bases

matrix of observed base call counts.

ref

vector of reference bases. Default: NULL.

Value

vector of most frequent base call counts.

Examples

bases <- matrix(c( 1,  0, 9, 0,
                   5,  0, 5, 0,
                   0, 10, 0, 0),
                ncol = 4, byrow = TRUE)
ref <- c("A", "A", "C")
# show most frequent base call counts
max_observed_bc(bases, ref)#'
#> [1] "G" "G" ""