WubingZhang / MAGeCKFlute

Integrative analysis pipeline for pooled CRISPR functional genetic screens
https://github.com/WubingZhang/MAGeCKFlute
24 stars 10 forks source link

Why does BatchRemove calculate a logarithm of base e? #2

Closed eregenyi closed 4 years ago

eregenyi commented 4 years ago

Hi Zhang,

I was experimenting with the batch effect removal functionality of mageck flute, and looked at the source code to understand better what was going on. I saw that in MAGeCKFlute/R/BatchRemove.R, line 46, the log transformation is log(dt+1). log() by default computes a logarithm of base e, for a log2 the base has to be specified like log(dt + 1, 2). Was base e the intention (I am asking because of the log2trans variable implied to me that it is log2)? What is the advantage of log e is over log2?

Best,

WubingZhang commented 4 years ago

Hi Eregenyi,

I would say that's a bug. In terms of batch effect removal, I think it's complicated and I'm not sure what's the difference between using log2 and log.

Thanks!