DEdist: Calculate inter-cluster distances

DEdistR Documentation

Calculate inter-cluster distances

Description

A variety of methods for calculating inter-cluster distances for sCVdata objects, most of which return matrices which can be converted to dist objects.

Usage

DEdist(sCVd, y)

## S4 method for signature 'sCVdata,numeric'
DEdist(sCVd, y)

## S4 method for signature 'sCVdata,missing'
DEdist(sCVd, y)

## S4 method for signature 'sCVdata,character'
DEdist(sCVd, y)

## S4 method for signature 'sCVdata,matrix'
DEdist(sCVd, y)

Arguments

sCVd

An sCVdata object.

y

One of the following, depending on the desired distance metric:

By number of differentially expressed genes:

A numeric vector of length one representing the threshold of false discovery rate controlled for when counting significantly differentially expressed genes.

By differential expression significance score:

Nothing. Only pass an argument to sCVd.

By gene expression summary statistic:

A character vector of length one referring to a column name in ClustGeneStats(sCVd): MGE, DR, or MDGE.

By distance between centroids in a cell embedding:

A matrix representing the cell embedding, where cells are rows and dimensions are columns. See getEmb to easily extract this from your input data object.

Value

A matrix of distances between clusters for each cluster resolution. Interpretable by as.dist to generate a dist object.

Methods (by class)

  • sCVd = sCVdata,y = numeric: By number of differentially-expressed genes (see fx_calcDist_numDE)

  • sCVd = sCVdata,y = missing: By differential expression significance score (see fx_calcDist_scoreDE)

  • sCVd = sCVdata,y = character: By gene expression summary statistic (see fx_calcDist_geneExpr)

  • sCVd = sCVdata,y = matrix: By distance between centroids in a cell embedding (see fx_calcDist_cellEmb)

See Also

DEdistNN for a method to find nearest neighbouring clusters from DEdist results.

Examples

## Not run: 
numDE_bw_clusts <- DEdist(sCVd=your_sCV_obj,0.01)
DEdistNN(numDE_bw_clusts)

## End(Not run)


BaderLab/scClustViz documentation built on Sept. 10, 2023, 11:51 p.m.