clusterPermutationSubcluster: Performs cluster/cell type permutations to estimate an...

View source: R/clusterPermutation_CellComm.R

clusterPermutationSubclusterR Documentation

Performs cluster/cell type permutations to estimate an empirical P-value.

Description

Sort cluster labels and calculate interaction with mean expression for each permutation. Save interaction to file every 1000 permutations.

Usage

clusterPermutationSubcluster(
  cellrouter,
  assay.type = "RNA",
  genelist,
  nPerm,
  interactions,
  cluster.label,
  subcluster.column = "Subpopulation",
  clusters
)

Arguments

cellrouter

CellRouter object.

assay.type

character; the type of data to use.

genelist

character vector; genes to use in the analysis.

nPerm

numeric; the number of permutations.

interactions

the interactions as calculated by the population.pairing function or the calculateObservedMean function.

cluster.label

character; column in the metadata table corresponding to the population.

subcluster.column

character; the name of the column where the subclustering information will be stored.

clusters

character; selected clusters.

Value

list; the interaction data frame for each permutation, including the columns of mean expression of ligands, receptors and pairs.


edroaldo/fusca documentation built on March 1, 2023, 1:43 p.m.