R/add_read_depth_column.R

Defines functions add_read_depth_column

Documented in add_read_depth_column

add_read_depth_column <- function(data = NULL, format_column = "vcf_format_sample", depth_index=4) {
  if (is.null(data)) stop("Mandatory argument data is missing")
  data$depth <- apply(X=as.matrix(data[[format_column]]), MARGIN=1, FUN=get_read_depth, depth_index=depth_index)

  return(data)
}
Bio-Core/BioCore.Annotation documentation built on Feb. 3, 2020, 6:01 p.m.