Compute the correlation of features broken down by groups with another covariate

GroupCorrelation(
  object,
  assay = NULL,
  slot = "scale.data",
  var = NULL,
  group.assay = NULL,
  min.cells = 5,
  ngroups = 6,
  do.plot = TRUE
)

Arguments

object

Seurat object

assay

Assay to pull the data from

slot

Slot in the assay to pull feature expression data from (counts, data, or scale.data)

var

Variable with which to correlate the features

group.assay

Compute the gene groups based off the data in this assay.

min.cells

Only compute for genes in at least this many cells

ngroups

Number of groups to split into

do.plot

Display the group correlation boxplot (via GroupCorrelationPlot)

Value

A Seurat object with the correlation stored in metafeatures