Question: Deseq2 with one factor and multiple levels
1
gravatar for mariannapauletto
6 months ago by
mariannapauletto20 wrote:

Dear all,

I'm dealing with and RNA-seq experiment with a total of 11 different conditions.

I'd like to do pairwise comparisons between some of them (without having a fixed base/ctrl condition). To do that, I'm planning to use the Wald-test.

After setting conditions (n=11), this is the command I used (in this example I want to compare condition C to E)

dds <- DESeqDataSetFromMatrix(countData = cts,
                             colData = colData,
                             design = ~ 0 + condition)
dds <- DESeq(dds)
res_condC_versus_condE = results(dds, contrast=c("condition","condC","condE"))

I've two main questions:

  1. Do you think the design formula and the results command are set in the correct way?
  2. Should I use lfcShrink only for data visualization and ranking??

Thank you for your time!!

Best

Marianna

rna-seq deseq2 • 387 views
ADD COMMENTlink modified 6 months ago by Kevin Blighe55k • written 6 months ago by mariannapauletto20
1
gravatar for Kevin Blighe
6 months ago by
Kevin Blighe55k
Kevin Blighe55k wrote:

Hey Marianna,

Regarding the design formula, why are you including ~ 0? You should just be doing ~ condition. For further reading on this, I direct you to these posts:

Regarding lfcshrink, I now implement lfcshrink into every analysis as it gives more realistic fold-change estimates. Please see the explanation of the DESeq2 developer, HERE.

Kevin

ADD COMMENTlink written 6 months ago by Kevin Blighe55k

Hi Kevin,

thank you for your reply!

If I use ~ condition, then the first level of the factor "condition" is fixed as a control/base condition and all the other levels will be compared to this control condition. How to deal with that?? I thought the only solution was to remove the intercept, so I can set the DE analysis between any condition. Am I wrong?? Are there alternative solutions to easily compare the different levels without fixing a base condition?

As far as lfcshrink, I assume I can use it instead of results(dds).

Thank you Marianna

Thank you

ADD REPLYlink written 6 months ago by mariannapauletto20
1

When you specify what to compare to what with contrast, it doesn't matter what the base level is for your factor.

ADD REPLYlink written 6 months ago by swbarnes27.5k

Ah!, no, you can leave the intercept in the model (just use ~ condition) and then do any pairwise comparison irerspective of the reference level, as I show, here: A: DESeq2 compare all levels

In that thread, I also show how you can use lfcshrink()

ADD REPLYlink written 6 months ago by Kevin Blighe55k
1

Thank you Kevin, really appreciated

Marianna

ADD REPLYlink written 6 months ago by mariannapauletto20

Hi Kevin,

I did the analysis as you suggested. I noticed that the log2fold changes are REALLY different if using lfcShrink.

For example for the most DE gene I got a log2FC of 4 and 0.05 using lfcShrink and results, respectively. Do you expect such a big difference??

Best Marianna

ADD REPLYlink written 6 months ago by mariannapauletto20

I am going to 'randomly' hypothesise that the gene in question has generally low expression in your data? Genes with low expression are quite problematic because they can appear to have inflated fold changes.

For example:

0.9 / 0.05 = 18

100 / 50 = 2

Although the first one has a fold change (linear) of 18, is it meaningful when considering that the expression of both genes in question is 0.9 and 0.05?

ADD REPLYlink written 6 months ago by Kevin Blighe55k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2154 users visited in the last hour