Skip to contents

Computes either the Euclidean or E-distance between groups in a Seurat object, depending on the chosen method.

Usage

ComputeDistance(
  seurat_object,
  groupby,
  reduction,
  method = "edist",
  verbose = TRUE
)

Arguments

seurat_object

An object of class Seurat.

groupby

An object of class character. Points to the column in the Seurat object's meta data that contains the group labels.

reduction

An object of class character. The reduction / embedding in seurat_object that is used to compute the distance. Can be "pca", "harmony", or any linear dimensionality reduction.

method

An object of class character. The distance calculation method, either "euclidean" or "edist".

verbose

An object of class logical. If TRUE, prints messages. Default is TRUE.

Value

Returns an object of class data.frame containing the distance between each pair of groups.

Examples