calculate_ddct {PlateVision}R Documentation

Calculate ddCt Statistics

Description

Performs the complete Delta-Delta Ct method with error propagation.

Usage

calculate_ddct(data, ref_gene, control_group)

Arguments

data

Output from import_plate().

ref_gene

Name of the housekeeping gene (e.g., "GAPDH").

control_group

Name of the control condition (e.g., "WT").

Value

A comprehensive dataframe with Fold Changes, Log2FC, P-values, and Error bars.

Examples

# Mock data: 2 biological replicates per group to allow t-test
df <- data.frame(
  Sample = c("S1", "S2", "S3", "S4"),
  Group = c("WT", "WT", "Treated", "Treated"),
  Gene = c(rep("GAPDH", 4), rep("Target", 4)),
  Ct = c(20, 20.1, 20.2, 20.3,   # GAPDH (Consistent)
         25, 24.8, 21, 21.2)     # Target (Down in Treated)
)

calculate_ddct(df, ref_gene = "GAPDH", control_group = "WT")

[Package PlateVision version 0.1.0 Index]