graph_test: Test genes for differential expression based on the low...

Description Usage Arguments Value See Also

View source: R/graph_test.R

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’s I test. Moran’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’s I ranges from -1 to 1, the interpretation of Moran’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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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


cole-trapnell-lab/monocle3 documentation built on April 8, 2021, 5:54 a.m.