Description Usage Arguments Value Author(s) Examples
This function generates random data (rnorm, or other provided by distr argument) or uses user-provided data to explain how KS-test and Wilcox-test measure difference in distributions. It shows empirical cumulative distribution of z-scores for a given group of genes (set) and for all other genes (other). User can compare this plot to the KS-test and the Wilcox-test results.
1 2 3 4 5 6 7 8 | ks.test_expl(N_other = 1000, N_set = 100, alternative = "greater",
z_score = 1.5, prop_pos = 0.3, prop_neg = 0, x_coor_other = -1.7,
x_coor_set = 1.7, cex = 1.7,
title = "Treatment: anti-Oct4 shRNA.\nOct4 is a pos. and a neg. regulator of its targets",
xlab = "z-score, simulated", lab_other = "other genes",
lab_set = "Oct4 targets", seed = 1, x = NULL, y = NULL,
gener_dist = NULL, gener_dist_lab = "all genes", distr = rnorm,
col_other = "black", col_set = "blue", ...)
|
N_other |
integer, size of the "other" group, ignored if x is provided |
N_set |
integer, size of the "set" group, ignored if y is provided |
alternative |
character, "greater" or "less". The choice of alternative hypothesis for KS-test |
z_score |
numeric, size of the true difference |
prop_pos |
numeric, between 0 and 1, the fraction of "set" group that is higher than other by |
prop_neg |
numeric, between 0 and 1, the fraction of "set" group that is lower than other by |
x_coor_other |
numeric, x coordinate of "other" group label on the plot |
x_coor_set |
numeric, x coordinate of "set" group label on the plot |
cex |
numeric, plotting parameter, size of the group label text, axis label text and axis annotation text |
title |
character, title of the plot |
xlab |
character, x-axis label |
lab_other |
character, other group label |
lab_set |
character, set group label |
seed |
integer, to initialise random number generator for reproducibility |
x |
numeric vector, the distribution of values of the "other" group. These can come from the experimental data. |
y |
numeric vector, the distribution of values of the "set" group. These can come from the experimental data. |
distr |
function that generates a vector of random numbers of lenght n (n argument to this function). rnorm by default |
col_other |
color of the other distribution (passed to plot(col = )). Details |
col_set |
color of the other distribution (passed to plot(col = )). Details |
... |
other plotting parameters |
list containing the output of KS-test and Wilcox-test
Vitalii Kleshchevnikov
1 2 3 | # Let's have a look at a TF that regulates
# some of it's targets positively, some negatively and some are not affected.
ks.test_expl(alternative = "greater", prop_pos = 0.33, prop_neg = 0.4, seed = 1, cex.main = 1.4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.