Given a dataframe containing single-cell marker measurements and x/y centroid coordinates, this function create a new Seurat object with single-cell marker expression and metadata. If multiple independent samples are included in the dataset, there is the possibility to merge sample coordinates into a unique space with parameter 'stitch =T'

prepare_seurat_other(
  data = NULL,
  markers.ids = NULL,
  xcoord = NULL,
  ycoord = NULL,
  stitch = F,
  sample.id = NULL,
  assay.name = "X"
)

Arguments

data

a dataframe containing single-cell measurements, metadata and spatial coordinates of cell centroids

markers.ids

data column names corresponding to marker expression measurements. These will be used to build Seurat count/data matrix

xcoord

data column name corresponding to cell centroid x coordinates

ycoord

data column name corresponding to cell centroid y coordinates

stitch

boolean, whether or not merging cell coordinates coming from independent samples within the dataset. Default is set to FALSE.

sample.id

data column name reporting sample identifiers. Must be specified when parameter stitch is set to TRUE

assay.name

character string that will be used to name the output Seurat assay

Value

a Seurat object containing cell spatial expression measurements and metadata