ks: ks

Description Usage Arguments Value See Also


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


ks(x, data)



A slinky object


a matrix of scores with genes as rows. Typically normalized, e.g. robust z scores (see rzs)


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


slinky documentation built on Nov. 8, 2020, 10:58 p.m.