qpcr_ddcq: Calculate ddCq values

Description Usage Arguments Value Examples

View source: R/qpcr_ddcq.R

Description

qpcr_ddcq subtracts the dCq control from the dCq treatment(s). It also calculates the fold change.

Usage

1
qpcr_ddcq(.data, dcq = dcq, treatment, untreated, pcr_target)

Arguments

.data

A data frame or tibble. It should already contain the dCq values.

dcq

Unquoted expression. Give the name of the column containing the dCq values. If you used the qpcr_dcq function to create the data set this column is called 'dcq'.

treatment

Unquoted expression. Tells the function the name of the column containing the treatment information. This function cannot deal with multiple treatment variables yet, for example if you have different additives and time points! In this case I would calculate the ddCq for each additive separately, by separating the data set per additive using dplyr's filter.

untreated

Quoted expression. Give the value in the treatment column that corresponds with you untreated control samples.

pcr_target

Unquoted expression. Give the name of the column that indicates which genes were targeted for PCR.

Value

Returns the same type as the input (e.g. a data frame or tibble). Three new columns are created. First, the dCq values of the untreated samples are averaged an moved to their own column. Second, the ddCq values are calculated and stored in column "ddcq". Third, the fold change is calculated and stored in column "fold_change".

Examples

1
2
3
4
ddcq_values <- qpcr_ddcq(ex_dcq,
                         treatment = treatment,
                         untreated = "ctrl",
                         pcr_target = primer_pair)

JorikBot/tidyqpcr documentation built on Jan. 28, 2021, 11:44 a.m.