tool.normalize.quality {Mergeomics} | R Documentation

## Check normalization quality

### Description

`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.

### Usage

    tool.normalize.quality(g, z)

### Arguments

`g` | normalization quality control will take place according to the normal distribution parameters defined by `g`, e.g. it can be normal distribution with 0-mean and std dev 1.
`z` | transformed data, i.e. either p-value or enrichment score

### Value

`res` | statitics of Kolmogorov-Smirnov Test result obtained for `z` values

### Author(s)

Ville-Petteri Makinen

### See Also

`tool.normalize`

### Examples

    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)

[Package Mergeomics version 1.10.0 Index]