Function to calculate KS based enrichment score based on robust z-scores
A slinky object
a matrix of scores with genes as rows. Typically normalized,
e.g. robust z scores (see
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.