Skip to contents

Trains the SPOTlight model using single-cell and spatial data. Marker genes must be supplied explicitly; automatic marker discovery is not supported.

Usage

build_model_spotlight(
  single_cell_obj,
  cell_type_col = "cell_ontology_class",
  spatial_obj,
  assay_sc = "counts",
  assay_sp = "counts",
  markers = NULL,
  ...
)

Arguments

...

Additional training parameters passed to SPOTlight::trainNMF().

single_cell_obj

SingleCellExperiment.

cell_type_col

Column with cell type labels.

spatial_obj

SpatialExperiment.

assay_sc

Single-cell assay to use.

assay_sp

Spatial assay to use.

markers

Required data.frame or S4Vectors DataFrame with columns gene, cluster and numeric mean.AUC weights in (0, 1]. Cluster labels must match cell_type_col. Each cell type needs a marker present in both expression objects. Gene/cluster pairs must be unique. NULL raises an error.