Question: DESeq2: three conditions lfcShrink CvsB analysis
0
4 months ago by
kcbauer0
kcbauer0 wrote:

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

deseq2 lfcshrink • 90 views
modified 4 months ago by Michael Love26k • written 4 months ago by kcbauer0
Answer: DESeq2: three conditions lfcShrink CvsB analysis
0
4 months ago by
Michael Love26k
United States
Michael Love26k wrote:

"I tried to relevel on condition B, but this doesn't change my resultsNames"

Did you follow the order of operations in the vignette that you quoted above?

Can you show how the resultsNames(dds) didn't change after re-leveling the condition and running nbinomWaldTest(dds).