inter_correlation_scExp: Calculate inter correlation between cluster or samples

View source: R/correlation_filtering_clustering.R

inter_correlation_scExpR Documentation

Calculate inter correlation between cluster or samples

Description

Calculate inter correlation between cluster or samples

Usage

inter_correlation_scExp(
  scExp_cf,
  by = c("sample_id", "cell_cluster")[1],
  reference_group = unique(scExp_cf[[by]])[1],
  other_groups = unique(scExp_cf[[by]]),
  fullCor = TRUE
)

Arguments

scExp_cf

A SingleCellExperiment

by

On which feature to calculate correlation ("sample_id" or "cell_cluster")

reference_group

Reference group to calculate correlation with. Must be in accordance with "by".

other_groups

Groups on which to calculate correlation (can contain multiple groups, and also reference_group). Must be in accordance with "by".

fullCor

A logical specifying if the correlation matrix was calculated on the entire set of cells (TRUE).

Value

A data.frame of average inter-correlation of cells in other_groups with cells in reference_group

Examples

data(scExp)
inter_correlation_scExp(scExp)

vallotlab/ChromSCape documentation built on Oct. 15, 2023, 1:47 p.m.