#' Evaluate heterogeneity
#'
#' `math_score` calculates MATH (mutant-allele tumor heterogeneity) score
#' from variant allele frequencies.
#' @inheritParams stats::mad
#' @rdname heterogeneity
#' @export
math_score = function(x, constant = 1.4826, na.rm = FALSE) {
med = stats::median(x, na.rm = na.rm)
mad = stats::mad(x, center = med, constant = constant, na.rm = na.rm)
mad / med
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.