log2 transformation in the GEO2R script for microarray analysis
1
1
Entering edit mode
10.0 years ago

Hello,

In the GEO2R R scripts to analyse microarray data (https://www.ncbi.nlm.nih.gov/geo/info/geo2r.html), there is an auto-detect feature to determine if the values are or are not in log space:

ex <- exprs(gset)
qx <- as.numeric(quantile(ex, c(0., 0.25, 0.5, 0.75, 0.99, 1.0), na.rm=T))
LogC <- (qx[5] > 100) || (qx[6]-qx[1] > 50 && qx[2] > 0) || (qx[2] > 0 && qx[2] < 1 && qx[4] > 1 && qx[4] < 2)
if (LogC) {
    ex[which(ex <= 0)] <- NaN
    exprs(gset) <- log2(ex)
}

My question is, how these specific quantile conditions (i.e. qx[5]>100) can determine if the values are or not in log space?

Thanks a lot

R • 3.6k views
ADD COMMENT
1
Entering edit mode
10.0 years ago
Irsan ★ 7.8k
if qx[5] > 100 is true than at least 1% of the data is bigger than 100. A value of 100 or bigger can not be the result of log transformation because the reverse 2-log (2^100) is so big that you cannot even calculate it!
ADD COMMENT
0
Entering edit mode

I agree with your reasoning. But, why specifically 100? I wonder if it is arbitrarily chosen.

Also, concerning the values for the other quantile conditions, I think other different explanations would be needed.

ADD REPLY
0
Entering edit mode

It's a nice round number, 99 or 101 would work just as well. That's also why 50 is used in testing the range.

ADD REPLY

Login before adding your answer.

Traffic: 1956 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