Skip to contents

Helper Function to generate shuffled means

Usage

get_permutations(
  lr_res,
  sce,
  nperms = 1000,
  seed = 1234,
  parallelize = FALSE,
  workers = 4,
  assay.type = "logcounts",
  verbose = TRUE
)

Arguments

lr_res

liana_pipe results

sce

SingleCellExperiment Object

nperms

number of permutations

seed

number used to set random seed

parallelize

logical whether to parallelize

workers

Number of workers to be used in parallelization

assay.type

- the type of data to be used to calculate the means (logcounts by default), available options are: "counts" and "logcounts"

verbose

logical for verbosity

Value

Returns a list of shuffled gene means by cluster

Details

This function could be made generalizable to any set of genes, depending on the set (currently lr_res genes) that is used to filter - i.e. it could be replaced with e.g. genes from TF regulons