I have 4 conditions being compared; 2 experimental conditions (KD1 and KD2), 1 control condition (SCR), and 1 wild-type condition (WT).
I need to perform the differential analysis by comparing KD1 vs SCR, KD2 vs SCR, and SCR vs WT.
I have created my DESeq2 condition vector as follows, so that SCR is used as the baseline for the comparisons.
metadata$Condition <- factor(metadata$Condition, levels = c("SCR", "KD1", "KD2", "WT"))
dds <- DESeqDataSetFromMatrix(
countData = counts,
colData = metadata,
design = ~ Condition
)
I am using apeglm log fold shrinkage values, which requires me to use coef values. As per my dds object, the coef values are Condition_WT_vs_SCR, Condition_KD1_vs_SCR, and Condition_KD2_vs_SCR.
To convert log2fc of WT_vs_SCR to SCR_vs_WT, is it correct to use the opposite sign of the WT_vs_SCR log2fc values to represent the SCR_vs_WT log2fc? (Negative/Positive WTvsSCR to Positive/Negative SCRvsWT log2fc respectively).
I saw in another discussion post that the calculation in DESeq2 is more complex than manual calculation, and am not sure if my method is correct.
I would greatly appreciate feedback, advice, and/or links to relevant discussions/tutorials that detail the DESeq2 log2foldchange calculation process.
Thank you.