Description Usage Arguments Value Author(s) See Also Examples
tool.normalize.quality
checks transformation quality by using
Kolmogorov-Smirnov Test. It seeks the best log transform parameter within
the previously specified upper and lower limits, and applies the log
transform with the best log parameter.
1 | tool.normalize.quality(g, z)
|
g |
normalization quality control will take place according to the
normal distribution parameters defined by |
z |
transformed data, i.e. either p-value or enrichment score |
res |
statitics of Kolmogorov-Smirnov Test result obtained for
|
Ville-Petteri Makinen
1 2 3 4 5 6 7 8 9 | set.seed(1)
## let us assume we have a set of normalized scores:
z <- abs(rnorm(10)) ## it should be positive and at least 10 length-vector
z <- z/median(z)
## Find the best log transform.
gamma <- optim(par=1.0, fn=tool.normalize.quality, gr=NULL, z,
lower=-9, upper=9, control=list(reltol=1e-3))
## After finding the best log transform, apply transform:
z <- log(exp(gamma$par)*z + 1.0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.