Skip to contents

Compute comparison tables.

Usage

compute_comparison(seuratObj, opt)

Arguments

seuratObj

a Seurat object

opt

a list of sub-lists (one for each individual comparison to compute), with elements:

  • 'name', a character being the name that will appear in the app

  • 'subset', a list with subset() parameters (except 'x', which is by default the Seurat object).

  • 'Ident', a character being the Idents of the Seurat object to use for Seurat::FindMarkers()

  • 'FindMarkers', a list with Seurat::FindMarkers() parameters (except 'object', which is by default the Seurat object). The name of each element in the list is the name of parameters of the function, and its value is the value to give to the parameters.

  • 'PseudobulkExpression', a list with Seurat::PseudobulkExpression() parameters (except 'object'). The name of each element in the list is the name of parameters of the function, and its value is the value to give to the parameters.

Value

a list of sub-lists (one for each individual marker table to compute). Each sub-list is named with the 'name' given as input, and contains the elements:

Examples

if (FALSE) { # \dontrun{
data("small_seurat")
opt <- list(
list(
  name = "First comparison",
  subset = list(
    subset = substitute(CellType %in% c("DC"))
  ),
  Ident = "seurat_clusters",
  FindMarkers = list(ident.1 = 1),
  PseudobulkExpression = list(assays = "RNA",
                             slot = "scale.data",
                             group.by = c("seurat_clusters", "CellType")
  )
) #,
#list(
#   name = "Second comparison",
#   ...
#)
)
compute_comparison(small_seurat, opt)
} # }