progressionTest  R Documentation 
Test whether or not the pseudotime distribution are identical within lineages between conditions
progressionTest(pseudotime, ...)
## S4 method for signature 'matrix'
progressionTest(
pseudotime,
cellWeights,
conditions,
global = TRUE,
lineages = FALSE,
method = ifelse(dplyr::n_distinct(conditions) == 2, "KS", "Classifier"),
thresh = ifelse(method == "Classifer", 0.05, 0.01),
args_mmd = list(),
args_classifier = list(),
args_wass = list(),
rep = 10000,
distinct_samples = NULL
)
## S4 method for signature 'SlingshotDataSet'
progressionTest(
pseudotime,
conditions,
global = TRUE,
lineages = FALSE,
method = ifelse(dplyr::n_distinct(conditions) == 2, "KS", "Classifier"),
thresh = ifelse(method == "Classifer", 0.05, 0.01),
args_mmd = list(),
args_classifier = list(),
args_wass = list(),
rep = 10000,
distinct_samples = NULL
)
## S4 method for signature 'SingleCellExperiment'
progressionTest(
pseudotime,
conditions,
global = TRUE,
lineages = FALSE,
method = ifelse(dplyr::n_distinct(conditions) == 2, "KS", "Classifier"),
thresh = ifelse(method == "Classifer", 0.05, 0.01),
args_mmd = list(),
args_classifier = list(),
args_wass = list(),
rep = 10000,
distinct_samples = NULL
)
## S4 method for signature 'PseudotimeOrdering'
progressionTest(
pseudotime,
conditions,
global = TRUE,
lineages = FALSE,
method = ifelse(dplyr::n_distinct(conditions) == 2, "KS", "Classifier"),
thresh = ifelse(method == "Classifer", 0.05, 0.01),
args_mmd = list(),
args_classifier = list(),
args_wass = list(),
rep = 10000,
distinct_samples = NULL
)
pseudotime 
Can be either a 
... 
parameters including: 
cellWeights 
If 
conditions 
Either the vector of conditions, or a character indicating which column of the metadata contains this vector. 
global 
If TRUE, test for all lineages simultaneously. 
lineages 
If TRUE, test for all lineages independently. 
method 
One of "KS", "Classifier", "mmd", "wasserstein_permutation" or "Permutation" for a permutation. See details. Default to KS if there is two conditions and to "Classifier" otherwise. 
thresh 
The threshold for the KS test or Classifier test.
Ignored if 
args_mmd 
arguments passed to the mmd test. See 
args_classifier 
arguments passed to the classifier test. See 
args_wass 
arguments passed to the wasserstein permutation test. See

rep 
Number of permutations to run. Only for methods "Permutations" and
"wasserstein_permutation". Default to 
distinct_samples 
The samples to which each cell belong to. Only use
with method 
For every lineage, we compare the pseudotimes of the cells from either conditions, using the lineage weights as observations weights.
If method = "KS"
, this uses the updated KS test,
see ks_test
for details.
If method = "Classifier"
, this uses a classifier to assess if
that classifier can do better than chance on the conditions
If method = "Permutation"
, the difference of weighted mean
pseudotime between condition is computed, and a pvalue is found by
permuting the condition labels.
If method = "mmd"
, this uses the mean maximum discrepancies
statistics.
The pvalue at the global level can be computed in two ways. method is "KS"
or
"Permutation"
, then the pvalues are computed using stouffer's
zscore method, with the lineages weights acting as weights. Otherwise,
the test works on multivariate data and is applied on all pseudotime values.
A data frame with 3 columns:
lineage for individual lineages, the lineage number. For global,
"All"
.
p.value the pvalue for the test at the global or lineage level
statistic for individual lineages, either the modified KS statistic
if method = "KS"
, or the weighted difference of means, if
method = "Permutation"
. For the global test, the combined Zscore.
Stouffer, S.A.; Suchman, E.A.; DeVinney, L.C.; Star, S.A.; Williams, R.M. Jr. (1949). The American Soldier, Vol.1: Adjustment during Army Life. Princeton University Press, Princeton.
data('slingshotExample', package = "slingshot")
rd < slingshotExample$rd
cl < slingshotExample$cl
condition < factor(rep(c('A','B'), length.out = nrow(rd)))
condition[110:139] < 'A'
sds < slingshot::slingshot(rd, cl)
progressionTest(sds, condition)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.