Predict cell type of query data based on reference data. We use caret R package to train a svm classifier.

predictFun(
  query_SeuratObj,
  reference_SeuratObj,
  group_by = "cellType",
  cluster_by = "seurat_clusters",
  species = "Homo sapiens",
  by = "GO",
  k = NULL,
  LDAmethod = "VEM"
)

Arguments

query_SeuratObj

query data

reference_SeuratObj

reference data

group_by

the column of reference_SeuratObj@meta.data that indicates cell type

cluster_by

the column of reference_SeuratObj@meta.data that indicates cluster

species

species of the reference data

by

database used to perform GSEA on reference data. This parameter works when reference_SeuratObj does not contain topic model.

k

number of topics. This parameter works when reference_SeuratObj does not contain topic model.

LDAmethod

method used for fitting a LDA model on reference data; currently "VEM" or "Gibbs" are supported. This parameter works when reference_SeuratObj does not contain topic model.

Value

data frame with 2 columns including clusters of query data, and the predicted cell type based on reference data.

Examples

if (FALSE) { predictFun(query_SeuratObj, reference_SeuratObj, group_by = 'cellType', cluster_by = 'seurat_clusters', species = "Homo sapiens", by = 'GO', k = NULL, LDAmethod = "VEM") }