Hello!
I'm new to RNA-Seq analyses and DeSEQ2. Apologies if this has been covered previously. I am running analyses on samples within three conditions. I created a dds object from a count matrix, pre-filtered, and moved on to differential expression analyses.
**dds <- DESeq(dds)
res1 <- results(dds, contrast=c("condition","B","A"))
res2 <- results(dds, contrast=c("condition","C","A"))
res3 <- results(dds, contrast=c("condition","C","B"))**
Then I tried lfcshrink...
**resLFC1 <- lfcShrink(dds, coef="conditionBvs_A", type="apeglm")
resLFC2 <- lfcShrink(dds, coef="conditionCvs_A", type="apeglm")
resLFC3 <- lfcShrink(dds, coef="conditionCvs_B", type="apeglm")**
Of course, I got an error on resLFC3 // coef %in% resultsNames(dds) is not TRUE
...As resultsNames only lists two conditions: "conditionBvsA" and "conditionCvsA"
I tried to relevel on condition B, but this doesn't change my resultsNames dds$condition <- relevel(dds$condition, ref = "B") I read the extended data section on shrinkage filters. "We give some examples below of producing equivalent designs for use with coef. We show how the coefficients change with model.matrix, but the user would, for example, either change the levels of dds$condition or replace the design using design(dds)<-, then run nbinomWaldTest followed by lfcShrink." Could someone help me on how to change the design(dds)...so I can run lfcSrhink on condition C vs B?
Thank you