Computes the global spatial autocorrelation statistics Moran's I and/or Geary's C for a set of genes

old_SThet(
  x = NULL,
  genes = NULL,
  samples = NULL,
  method = "moran",
  overwrite = T
)

Arguments

x

an STlist

genes

a vector of gene names to compute statistics

samples

the samples to compute statistics

method

The spatial statistic(s) to estimate. It can be set to 'moran', 'geary' or both. Default is 'moran'

overwrite

logical indicating if previous statistics should be overwritten. Default to TRUE (overwrite)

Value

an STlist containing spatial statistics

Details

The function computes global spatial autocorrelation statistics (Moran's I and/or Geary's C) for the requested genes and samples. Then computation uses the package spdep. The calculated statistics are stored in the STlist, which can be accessed with the get_gene_meta function.