Calculate the fold change between two groups
1
0
Entering edit mode
4.6 years ago
ddzhangzz ▴ 90

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 • 14k views
ADD COMMENT
0
Entering edit mode

Fold change is a ratio of number of aligned or classified transcripts in the treatment condition and the control condition. As the number of transcripts can never be negative, I wonder why are some of our fold change values are negative (not after log2 transformation!)

Could somebody please explain this?

ADD REPLY
1
Entering edit mode

FCs are almost exlusively reported as log2 because otherwise FCs < 1 are bunched together between 0 and 1 while > 1 would be 1 to infinity. The log transformation makes the FC negative if FC is smaller 1. Just calcualte log2(10/50) then you understand how negative FCs can happen. Please do not ask questions in the answer field.

ADD REPLY
3
Entering edit mode
4.6 years ago

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

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
2
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1865 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6