This is used to calculate the normalized `cq` values for reference `target_ids` (e.g. genes), to use in `delta_cq` calculation for each `sample_id`.

calculate_normvalue(
  value_df,
  ref_ids,
  value_name = "value",
  id_name = "id",
  norm_function = median
)

Arguments

value_df

data frame containing relevant columns, those named in `value_name` and `id_name` parameters.

ref_ids

values of reference ids, that are used to calculate normalized reference value.

value_name

name of column containing values. This column should be numeric.

id_name

name of column containing ids.

norm_function

Function to use to calculate the value to normalize by. Default function is median, alternatively could use mean, geometric mean, etc.

Details

Also used to calculate the normalized `delta_cq` values for reference `sample_ids`, to use in `deltadelta_cq` calculation for each `target_id`.