Skip to contents

Compute several marker table and expression for a dataset. The aim of this function is to facilitate creating a marker object in the correct format, in order to add it to the database.

Usage

compute_markers(seuratObj, opt)

Arguments

seuratObj

a Seurat object

opt

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

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

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

  • 'FindAllMarkers', a list with Seurat::FindAllMarkers() 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', 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.

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 = "CellType markers",
   Ident = "CellType",
   FindAllMarkers = list(only.pos = TRUE,
                        min.pct = 0.25,
                        logfc.threshold = 0.5),
   PseudobulkExpression = list(assay = "RNA",
                             slot = "scale.data",
                             group.by = c("CellType", "orig.ident")
                         )
 ) #,
 # list(
 #  name = "seurat_clusters markers",
 #  #...
 # )
)
compute_markers(small_seurat, opt)
} # }