Learn R Programming

monocle3 (version 1.0.0)

graph_test: Test genes for differential expression based on the low dimensional embedding and the principal graph

Description

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.

Usage

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
)

Arguments

cds

a cell_data_set object upon which to perform this operation

neighbor_graph

String indicating what neighbor graph to use. "principal_graph" and "knn" are supported. Default is "knn", but "principal_graph" is recommended for trajectory analysis.

reduction_method

character, the method used to reduce dimension. Currently only supported for "UMAP".

k

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.

method

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.

alternative

a character string specifying the alternative hypothesis, must be one of greater (default), less or two.sided.

expression_family

a character string specifying the expression family function used for the test.

cores

the number of cores to be used while testing each gene for differential expression.

verbose

Whether to show spatial test (Moran's I) errors and warnings. Only valid for cores = 1.

Value

a data frame containing the p values and q-values from the Moran's I test on the parallel arrays of models.

See Also

moran.test geary.test