We are often interested in finding genes that are differentially expressed across a single-cell trajectory. Monocle3 introduces a new approach for finding such genes that draws on a powerful technique in spatial correlation analysis, the Moran<U+2019>s I test. Moran<U+2019>s I is a measure of multi-directional and multi-dimensional spatial autocorrelation. The statistic tells you whether cells at nearby positions on a trajectory will have similar (or dissimilar) expression levels for the gene being tested. Although both Pearson correlation and Moran<U+2019>s I ranges from -1 to 1, the interpretation of Moran<U+2019>s I is slightly different: +1 means that nearby cells will have perfectly similar expression; 0 represents no correlation, and -1 means that neighboring cells will be anti-correlated.
graph_test(
cds,
neighbor_graph = c("knn", "principal_graph"),
reduction_method = "UMAP",
k = 25,
method = c("Moran_I"),
alternative = "greater",
expression_family = "quasipoisson",
cores = 1,
verbose = FALSE
)
a cell_data_set object upon which to perform this operation
String indicating what neighbor graph to use. "principal_graph" and "knn" are supported. Default is "knn", but "principal_graph" is recommended for trajectory analysis.
character, the method used to reduce dimension. Currently only supported for "UMAP".
Number of nearest neighbors used for building the kNN graph which is passed to knn2nb function during the Moran's I (Geary's C) test procedure.
a character string specifying the method (currently only 'Moran_I' is supported) for detecting significant genes showing correlation along the principal graph embedded in the low dimensional space.
a character string specifying the alternative hypothesis, must be one of greater (default), less or two.sided.
a character string specifying the expression family function used for the test.
the number of cores to be used while testing each gene for differential expression.
Whether to show spatial test (Moran's I) errors and warnings. Only valid for cores = 1.
a data frame containing the p values and q-values from the Moran's I test on the parallel arrays of models.