#' Convert read counts to TPM
#'
#' @param counts numeric.
#' @param eff_len numeric.
#'
#' @return A numeric vector of TPM values.
#' @export
counts_to_tpm <- function(counts, eff_len) {
rate <- log(counts) - log(eff_len)
denom <- log(sum(exp(rate)))
exp(rate - denom + log(1e6))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.