Skip to contents

Reconstructs the cellspec components stored by cs_as_spe().

Usage

cs_from_spe(spe)

Arguments

spe

A SpatialExperiment created by cs_as_spe().

Value

A validated cellspec object.

See also

Other interoperability: cs_as_anndata(), cs_as_spe()

Examples

# \donttest{
if (requireNamespace("SpatialExperiment", quietly = TRUE)) {
  x <- cs_example()
  policy <- cs_signal_policy(cs_markers(x))
  identical(cs_cells(x), cs_cells(cs_from_spe(cs_as_spe(x, policy))))
}
#> [1] TRUE
# }