Converts an STlist into a Seurat (v5) object, one image/slice per sample, so spatialGE results can be taken into Seurat-based workflows.
as_Seurat(x = NULL, assay = "Spatial", samples = NULL)a Seurat object
Each sample in the STlist becomes one FOV in the returned object, named after
the sample. Raw counts go to the counts layer and, when transform_data()
has been run, transformed counts go to the data layer. Spot-level columns
from @spatial_meta – including STclust cluster assignments – are carried
into @meta.data, prefixed by sample where a merge would otherwise collide.
Cell names are prefixed with the sample name (<sample>_<libname>) because
spot barcodes are only unique within a sample in the general case, and a merged
Seurat object requires globally unique cell names.