- dynamo.tl.moran_i(adata, X_data=None, genes=None, layer=None, weighted=True, assumption='permutation', local_moran=False)
Identify genes with strong spatial autocorrelation with Moran’s I test.
This can be used to identify genes that are potentially related to critical dynamic process. Moran’s I test is first introduced in single cell genomics analysis in (Cao, et al. 2019). Note that moran_i supports performing spatial autocorrelation analysis for any layer or normalized data in your adata object. That is you can either use the total, new, unspliced or velocity, etc. for the Moran’s I analysis.
AnnData) – An AnnData object.
bool) – Whether to consider edge weights in the spatial weights graph. Defaults to True.
'randomization']) – Assumption of the Moran’s I test. Inference for Moran’s I is based on a null hypothesis of spatial randomness. The distribution of the statistic under the null can be derived using either an assumption of normality (independent normal random variates), or so-called randomization (i.e., each value is equally likely to occur at any location). An alternative to an analytical derivation is a computational approach based on permutation. This calculates a reference distribution for the statistic under the null hypothesis of spatial randomness by randomly permuting the observed values over the locations. The statistic is computed for each of these randomly reshuffled data sets, which yields a reference distribution. Defaults to “permutation”.
bool) – Whether to also calculate local Moran’s I. Defaults to False.
- Return type:
The updated AnnData object with a new key ‘Moran_’ + type in the .uns attribute, storing the Moran’ I test results.