That is it. I got it and I was doing some mistake when using B/A. Thanks for detailed explanation.

Entering edit mode

I want to present my differential expression data as log ratio instead of just giving fold change I thought I could use log2 change but the - overall - value (down regulation) gives me error. Any suggestion what should be the best way to present log ratio of differential expression. To further clarify I have expression of A - expression of B = differential expression C and transfer to log ratio of C

Thanks

Entering edit mode

Dear,

Negative values will throw an error. you cannot get a negative value for `2^b`

whatever real number you give to `b`

. Try to do this:

```
log[1+|C|/min(A,B)]*sign(A-B)
```

where `|C|`

is the absolute value of `C`

, and `min(A,B)`

is the smallest of A and B, and `sign(A-B)`

is just the sign. Change the `(A-B)`

to `(B-A)`

if you plot B on top or vice versa.

I hope it helps,

Regards,

Entering edit mode

Any suggestion what should be the best way to present log ratio of differential expression.

Yes, present differential expression as a log2 ratio. If A = 32 and B = 18, the A/B ratio is 32/18 = 1.77. The log2(1.77) = 0.83. (what is the exact nature of the error you get?). To retrieve the original linear ratio value: 2^0.83 = 1.77. It all works the same even if the ratio was the other way around B/A = 18/32 = 0.56; and log2(0.56) = -0.83; and 2^-0.83 = 0.56. And if your numbers are starting off in log space (since you have A - B depicting a ratio), then C is already a log value and does not need to transformed to log space.

Loading Similar Posts

Let em explain little more about my challenge. I have list of genes which are mostly upregulated except 3-4 genes which are down regulated. I want to send this table as supplementary table for publication and want to use instead of absolute fold change. I have seen several paper publications listing log ratio.

Here is an example of one such paper.