Question: How basemean/basemeanA/basemeanB and log2foldchange are counted in DESeq2 ?
1
gravatar for IvyChan
2.9 years ago by
IvyChan0
IvyChan0 wrote:

I am new in RNAseq analysis , I was wondering why DESeq2 doesn't show the basemeanA and basemeanB in results just like DESeq ? And how the basemean/basemeanA/basemeanB and log2foldchange are counted ? Thank you.

rna-seq deseq2 basemean • 3.5k views
ADD COMMENTlink modified 2.9 years ago by Martombo2.5k • written 2.9 years ago by IvyChan0
4
gravatar for Martombo
2.9 years ago by
Martombo2.5k
Seville, ES
Martombo2.5k wrote:

As already pointed out, the normal DESeq2 log2FC are shrunken. For this reason, the program doesn't show the two basemeans, since the default log2FC wouldn't match. If you want to know these values, you'll need to get the MLE log2FC, by setting the option addMLE = TRUE when calling the function results(). You can access all intermediate quantities computed by DESeq2 with the function mcols(dds) on the DESeqDataSet object. There you'll find MLE_Intercept column and MLE_contrast_B_vs_A. In case you have a simple single variable design, your first condition basemean will simply be 2^MLE_Intercept and the second condition basemean is 2^(MLE_Intercept + MLE_contrast_B_vs_A). The general basemean, reported in the results, would be the average of the two.

ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by Martombo2.5k

Thank you so much . Your answer is really help and I will try it again .

ADD REPLYlink modified 2.9 years ago • written 2.9 years ago by IvyChan0

This is really very helpful information. Can you please suggest how to calculate the log2fc or fc using the values from mcols(dds) output. I calculated first and second basemean as suggested and log2fc by log(basemean2/basemean1). However, it does not match with DeSeq2 output value.

  1. MLE_Intercept = 2.470582585
  2. MLE_trt_RJn_vs_LJn = 11.96050899
  3. basemean1 = 2^2.470582585 = 5.54267565
  4. basemean2 = 2^(2.470582585 + 11.96050899) = 22089.78225
  5. basemean2/basemean1 = 3985.400489
  6. log2(3985.400489) = 11.960

However, in DESeq2 output, it is given as log2FoldChange = 11.77419978

I am not sure why the difference?

ADD REPLYlink modified 2.7 years ago • written 2.7 years ago by sutturka150
2
gravatar for Devon Ryan
2.9 years ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

Since DESeq2 shrinks fold-changes I'm not sure how well basemeanB would match what you're expecting. Anyway, "basemean" is essentially the intercept in the GLM, with the caveat that an "extended model matrix" might get used in which case it's more like what you'd get with a ~1 design. The log2foldchanges are then the equivalent coefficients from the GLM. Note that these are shrunken by default, which tends to make them more reliable (so you're not going to calculate them by hand).

ADD COMMENTlink written 2.9 years ago by Devon Ryan91k

Thank you for your help.I just curious about what these value mean and how they come from.Thank you , your answer is really help me a lot !

ADD REPLYlink written 2.9 years ago by IvyChan0
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: 653 users visited in the last hour