Skip to contents

This method implements the HotSpot approach (see DeTomaso, et al.) to calculate the local gene-gene correlations and their Z-scores.

Usage

hotspot_gene_cor_sc(
  object,
  embd_to_use = "pca",
  hotspot_params = params_sc_hotspot(),
  no_embd_to_use = NULL,
  cells_to_take = NULL,
  genes_to_take = NULL,
  streaming = FALSE,
  random_seed = 42L,
  .verbose = TRUE
)

Arguments

object

SingleCells class.

embd_to_use

String. The embedding to use. Defaults to "pca".

hotspot_params

List with hotspot parameters, see params_sc_hotspot() with the following elements:

  • model - String. Which of the available models to use for the gene expression. Choices are one of c("danb", "normal", "bernoulli").

  • normalise - Boolean. Shall the data be normalised.

  • knn - List of kNN parameters. See params_knn_defaults() for available parameters and their defaults.

no_embd_to_use

Optional integer. Number of embedding dimensions to use. If NULL all will be used.

cells_to_take

Optional string vector. If you want to only use selected cells. If NULL will default to all cells_to_keep in the class.

genes_to_take

Optional string vector. If you wish to limit the search to a subset of genes. If NULL will default to all genes in the class.

streaming

Boolean. Shall the data be streamed in. Useful for larger data sets.

random_seed

Integer. Used for reproducibility.

.verbose

Boolean. Controls verbosity of the function.

Value

A sc_hotspot class that can be used for subsequent analysis.

Details

Should a gene not be found in sufficient cells, the pairs with this gene will be set to 0. Please ensure prior to running the function that you are only calculating gene-gene auto-correlations that occur in sufficient cells.