R/2ddCt.R

Defines functions nrmlzd_expr

Documented in nrmlzd_expr

#Function for calculating 2^(-ddCt)

#' Calculation for 2^(-ddCt); the normalized expression value
#'
#' Generates a normalized expression value in reference to a control condition based on ddCt
#'
#' @return data frame
#' @import tidyverse
#' @importFrom magrittr "%>%"
#' @param df data frame containing column with dCt values generated by dCt()
#' @param cntrl_cond the sample_name of the control condition in the experiment
#'
#' @examples
#' final_df<- nrmlzd_expr(df)
#'
#' @export
#'
nrmlzd_expr <- function(df) {

  final_df <- df %>%
    dplyr::mutate(nrmlized_expression = 2^(-df$dd_Ct))

  return(final_df)

}
rhecht95/qPCR documentation built on Dec. 25, 2021, 9:41 a.m.