A wrapper function to calculate all metrics

CellSPA(
  spe,
  spe_celltype = NULL,
  sce_ref,
  ref_celltype = sce_ref$celltype,
  positive_marker_list = NULL,
  negative_marker_list = NULL,
  nn_celltype_pair = NULL,
  nn_neg_markers_list = NULL,
  exprs_values = "logcounts",
  use_BPPARAM = BiocParallel::SerialParam(),
  bin_width = 500,
  distance_breaks = c(seq(0, 50, 10), 100),
  verbose = TRUE
)

Arguments

spe

A Spatial Experiment object

spe_celltype

A string or a vector indicating the cell type information. If it is a string, it will retrive the information from colData.

sce_ref

A SingleCellExperiment object for the reference data

ref_celltype

A vector with length of the sample indicating the cell type label.

positive_marker_list

A list of positive markers

negative_marker_list

A list of negative markers

nn_celltype_pair

A pair of cell type.

nn_neg_markers_list

A list of negative marker corresponding to each cell type in `nn_celltype_pair`.

exprs_values

A string indicating which assay of `spe` contains the expression values.

use_BPPARAM

A BiocParallelParam instance determining the parallel back-end to be used during evaluation.

bin_width

A numeric indicates the width of the bin.

distance_breaks

A numeric vector of two or more unique cut points for distance between the pair of cell type.

verbose

A logical value indicates whether to print out running messages.

Value

A SpatialExperiment object