DESeq2 Apeglm Coefficient Reordering / Log2FoldChange Comparison Change
1
0
Entering edit mode
sk • 0
@fa435831
Last seen 3 months ago
Canada

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.

DESeq2 apeglm • 533 views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States

Yes, you can simply flip the sign of the logFC to reverse the direction of the comparison.

Login before adding your answer.

Traffic: 839 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6