Create a sf data frame object (package sf) using CosMx cell coordinates
smi2sf(seurat = NULL, poly_file = NULL, id = "cell_ID", return.seurat = F)a Seurat object containing CosMx data
character string indicating the path for the polygon coordinates file. This parameter is ignored if Seurat object has been created using the function prepare_cosmx_seurat()
name of the variable to use as single cell identifier
boolean, whether returning the input Seurat file with the sf object stored in the Kandinsky sf slot or Seurat misc slot (TRUE) or the nb object alone (FALSE). Default value is TRUE
Seurat object with the new sf object stored in the misc slot, or in the Kandinsky sf slot, or the sf object alone, depending on the return.seurat parameter
This function will use CosMx cell boundary coordinates to create cell polygon geometries using the R package sf