REPEATED_DDCt: Fold change (DeltaDelta C_T) analysis of repeated-measure...

View source: R/REPEATED_DDCt.r

REPEATED_DDCtR Documentation

Fold change (\Delta\Delta C_T) analysis of repeated-measure qPCR data

Description

The REPEATED_DDCt function performs fold change (FC) analysis using the \Delta\Delta C_T method for qPCR data obtained from repeated measurements over time. Data may originate from uni- or multi-factorial experimental designs.

In addition to numerical results, bar plots of relative expression (RE) or log2 fold change values with associated uncertainty are optionally produced.

Usage

REPEATED_DDCt(
  x,
  numberOfrefGenes,
  factor,
  calibratorLevel,
  block,
  x.axis.labels.rename = "none",
  p.adj = "none",
  plot = TRUE,
  plotType = "RE"
)

Arguments

x

A data frame in which the first column is the individual identifier (id), followed by one or more factor columns (including time). Expression-related columns (time, target gene, reference gene(s)) must appear at the end of the data frame in the required order.

numberOfrefGenes

Integer specifying the number of reference genes (must be \ge 1).

factor

Character string specifying the factor for which fold changes are analysed (commonly "time").

calibratorLevel

A level of factor to be used as the calibrator (reference level).

block

Optional blocking factor column name. If supplied, block effects are treated as random effects.

x.axis.labels.rename

Optional character vector used to replace x-axis labels in the bar plot.

p.adj

Method for p-value adjustment (passed to emmeans).

plot

Logical; if FALSE, plots are not produced.

plotType

Either "RE" (relative expression) or "log2FC" (log2 fold change).

Details

The analysis is carried out using a linear mixed-effects model in which repeated measurements are accounted for by a random effect of individual (id). The factor of interest (e.g. time or treatment) is specified via the factor argument. The first level of this factor (or the level specified by calibratorLevel) is used as the calibrator.

The function supports one or more reference genes. When multiple reference genes are supplied, their contributions are averaged when computing weighted \Delta C_T values.

Value

A list with the following components:

Final_data

Input data frame augmented with weighted \Delta C_T values.

lm

Fitted linear mixed-effects model object.

ANOVA_table

ANOVA table for fixed effects.

Relative_Expression_table

Table containing RE values, log2FC, p-values, significance codes, confidence intervals, and standard errors.

RE_Plot

Bar plot of relative expression values (if requested).

log2FC_Plot

Bar plot of log2 fold change values (if requested).

Author(s)

Ghader Mirzaghaderi

Examples

REPEATED_DDCt(
  data_repeated_measure_1,
  numberOfrefGenes = 1,
  factor = "time",
  calibratorLevel = "1",
  block = NULL
)

REPEATED_DDCt(
  data_repeated_measure_2,
  numberOfrefGenes = 1,
  factor = "time",
  calibratorLevel = "1",
  block = NULL
)

rtpcr documentation built on Dec. 19, 2025, 5:07 p.m.