Question: Calculate the fold change between two groups
0
gravatar for ddzhangzz
3.9 years ago by
ddzhangzz90
United States
ddzhangzz90 wrote:

Suppose I have gene expression values (not at log2) at pre and post from 3 patients (these are real values):

pre<-c(22.228, 0.002, 0.013)
post<-c(0.185, 0.018, 0.009)

I am wondering how to calculate the mean fold change between pre and post:

#mean of fold change
mean(post/pre)
[1] 3.234
#fold change of mean
mean(post)/mean(pre)
[2] 0.0095

Seems completely different, which one is the correct or should be calculated other ways?

If I wanted to calculate the log2FC:

#this seems the limma formula
mean(log2(post))-mean(log2(pre))
[1] -1.4231
#then back to fold change:
2^-1.4231
[1] 0.3729

Why this 0.3729 is so different from either the other two 0.0095 and 3.234? Which way should I use?

rna-seq • 11k views
ADD COMMENTlink modified 3.9 years ago by Devon Ryan95k • written 3.9 years ago by ddzhangzz90
3
gravatar for Devon Ryan
3.9 years ago by
Devon Ryan95k
Freiburg, Germany
Devon Ryan95k wrote:

mean(post)/mean(pre) is the fold-change. The log2 fold-change is log2(mean(post)/mean(pre)).

ADD COMMENTlink modified 3.9 years ago • written 3.9 years ago by Devon Ryan95k

Thanks @Devon Ryan! Would you mind to provide some reference so I can check in details?

ADD REPLYlink written 3.9 years ago by ddzhangzz90
2

I wouldn't know what to reference for that, it's basic math. I should also note that you should not be calculating this yourself for RNAseq.

ADD REPLYlink written 3.9 years ago by Devon Ryan95k

"you should not be calculating this yourself for RNAseq." Why?

ADD REPLYlink written 2.3 years ago by Arindam Ghosh280
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: 1253 users visited in the last hour