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

View source: R/clusterPermutation_CellComm.R

clusterPermutationR 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

clusterPermutation(
  cellrouter,
  assay.type = "RNA",
  genelist,
  nPerm,
  interactions,
  cluster.label
)

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 (CellRouter@sampTab) corresponding to the population.

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.