I have Gene Id as ID column & Control(WT), 2 mutated genes (MA and MD) as Conditions. Each condition has 3 columns of data (WT -3, MA-3, MD-3)
My goal is to compare MA vs WT and MD vs WT - perform differential expression analysis and pathway enrichment analysis.
counts - counts data;
sample_data - metadata;
condition - WT, MA, MD
dds <- DESeqDataSetFromMatrix(countData = counts,
colData = sample_data,
design = ~ condition)
dds = DESeq(dds) # main function
resultsNames(dds)
However when I enter the following command it says - "Intercept" "cell_line_MD_vs_MA" "cell_line_WT_vs_MA" But I want the comparison to be about MA vs WT and MD vs WT. I am able to use the contrast option to compare the conditions but when i try to use lfcShrink(dds, coef= "cell_line_MA_vs_WT", type="apeglm") it does not work. Please let me know how I can apply lfc in this case when the dds results are by default - "cell_line_MD_vs_MA" "cell_line_WT_vs_MA".
Thanks for your previous answer but I have updated the question and it would be great if you could help me by answering it. My dds results are by default - "cell_line_MD_vs_MA" "cell_line_WT_vs_MA" but I am able to apply contrasts to do a comparison across conditions but when I try to apply logfcshrinkage it does not work because the conditions I am looking for are - "cell_line_MA_vs_WT", "cell_line_MD_vs_WT".
DESeq2 will use the first factor level as the default level for the regression, so if you change the first factor level to WT it should fix your problem.
A: type='apeglm' shrinkage only for use with 'coef'