Run a C++ implementation of the core SciBet classifier using a
labeled reference Seurat object.
Usage
RunSciBet(
srt_query,
srt_ref,
ref_group,
query_group = NULL,
query_assay = NULL,
ref_assay = NULL,
query_layer = "counts",
ref_layer = "counts",
features = NULL,
nfeatures = 1000,
additional_features_per_class = 0,
input_transform = c("auto", "none", "expm1"),
prefix = "scibet",
store_model = TRUE,
store_probabilities = FALSE,
return_object = TRUE,
verbose = TRUE
)Arguments
- srt_query
An object of class Seurat to be annotated with cell types.
- srt_ref
An object of class Seurat storing the reference cells.
- ref_group
Column name in the
srt_refmetadata that represents the cell grouping.- query_group
Column name in the
srt_querymetadata that represents the cell grouping.- query_assay
Assay to be used for the query data. Default is the default assay of the
srt_queryobject.- ref_assay
Assay to be used for the reference data. Default is the default assay of the
srt_refobject.- query_layer, ref_layer
Assay layers used for query and reference.
- features
Candidate features used by SciBet. If
NULL, common genes between query and reference are used.- nfeatures
Number of entropy-test features selected from
features.- additional_features_per_class
Additional high-expression features selected per reference class.
- input_transform
How to transform extracted values before SciBet's internal
log1pstep."auto"appliesexpm1to"data"layers and no transform otherwise.- prefix
Prefix for metadata columns.
- store_model
Whether to store the SciBet core and probabilities in
srt_query@tools.- store_probabilities
Whether to store the full cell-by-class probability matrix. The default keeps annotations and maximum probability scores while avoiding a large result object on full-scale data.
- return_object
Whether to return the annotated
Seuratquery object. IfFALSE, return a lightweight list with annotations, scores, probabilities, and model components without copyingsrt_query.- verbose
Whether to print the message. Default is
TRUE.
Value
A Seurat object with SciBet annotations in metadata and results in
srt_query@tools[["SciBet"]].
Examples
data(panc8_sub)
keep <- panc8_sub$celltype %in% c("ductal", "alpha", "beta")
panc8_sub <- Seurat::NormalizeData(panc8_sub[, keep], verbose = FALSE)
reference <- panc8_sub[, panc8_sub$tech != "fluidigmc1"]
query <- panc8_sub[, panc8_sub$tech == "fluidigmc1"]
query <- RunSciBet(
srt_query = query, srt_ref = reference,
ref_group = "celltype", nfeatures = 200, verbose = FALSE
)
query <- RunStandardWorkflow(query, verbose = FALSE, linear_reduction_dims = 10)
#> ℹ [2026-10-11 23:47:14] Skip `log1p()` because `layer = data` is not "counts"
CellDimPlot(
query,
group.by = "scibet_annotation",
label = TRUE, legend.position = "bottom"
)