ks {slinky} | R Documentation

## ks

### Description

Function to calculate KS based enrichment score based on robust z-scores

### Usage

    ks(x, data)

### Arguments

`x` | A slinky object
`data` | a matrix of scores with genes as rows. Typically normalized, e.g. robust z scores (see `rzs`)

### Value

Vector of KS scores for each gene. The the original CMAP paper by Lamb et al. used a KS random walk based statistic for calculating enrichment. Here we use the same metric to identify differentially expressed genes. The question arises how to summarize accross replicates. We use a \"rank of ranks\" approach. With this method, each sample is ranked, and then the entire matrix is ranked to create a single vector. The KS statistic is then calculated for each gene based on the position of their replicate values in the vectorized matrix. In this way, genes that consistently have high ranks within each sample will have a higher KS score than those that are inconsistently ranked.

### See Also

`rzs`

[Package slinky version 1.6.0 Index]