Prepare the KNN classifier from a given Seurat object.

buildClassifierFromSeurat(
  seuObj,
  markerList,
  doLog2transform = TRUE,
  assay = "RNA",
  layer = "count"
)

Arguments

seuObj

An Seurat object

markerList

A list of protein-marker map

doLog2transform

logical(1L). Do log2(x+1) transform or not for the 'RNA' assay.

assay, layer

The assay and layer used to create the classifier.

Value

An gknn object

Examples

if (FALSE) { # \dontrun{
markers <- readRDS(system.file('extdata', 'markers.name.map.rds',
package='cdQuPath'))
pseudo <- readRDS(system.file('extdata', 'pseudobulk.scRNAseq.rds',
package='cdQuPath'))
library(future.apply)
plan(multisession)
buildClassifierFromSeurat(pseudo, markers)
} # }