Hi The thanks I change the command to median_center_apply <- function(x) {apply(x, 2, function(y) (y - median(y))/mad(y))} but still not work
Does anyone know how to caculate log2 median-centered intensity in onconmine
the expression data x by GEOquery is gene probe in rows, sample/array in column.
I first log2 all data
1.
y <- log2(x)
then median centered and normalize sd to one per array/sample
2.
median_center_apply <- function(x) {apply(x, 2, function(y) (y - median(y))/sd(y))}
z <- median_center_apply(y)
(which seems like the z-score but between genes in one sample/column, not on one gene probe between samples in one row, anyone know why oncomine use log2 median-centered intensity but not z-score?)
However, i still cannot get the exact same number with that in oncomine. anyone can help?
1 answer
Sometimes, people use a "robust" estimation of SD along with the "robust" estimation of population mean, which is the median in this case( sometimes people use trimmed mean as well). For robust SD, often "median absolute deviation"(MAD) is used to calculate the robust z-score.
Please check whether median along with MAD (or any other robust estimates of mean and variance) was used by Oncomine
https://www.pnas.org/content/pnas/suppl/2012/11/30/1209673109.DCSupplemental/pnas.201209673SI.pdf
Try the Iglewicz and Hoaglin formula:
y.z <- 0.6745 * (y-median(y,na.rm=TRUE))/mad(y)
https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm
thanks but sorry The still not work the oncomine value is larger than what I get, after times 0.6745, it became much larger.
Log in to answer this question.