Skip to contents

Convert a Seurat V5 object to a Giotto object

Usage

seuratToGiottoV5(
  sobject,
  spatial_assay = "Spatial",
  dim_reduction = c("pca", "umap"),
  subcellular_assay = "SCT",
  sp_network = NULL,
  nn_network = NULL,
  polygon = TRUE,
  verbose = TRUE
)

Arguments

sobject

Input Seurat object to convert to Giotto object

spatial_assay

Specify name of the spatial assay slot in Seurat. Default is "Spatial".

dim_reduction

Specify which dimensional reduction computations to fetch from input Seurat object. Default is "c('pca', 'umap')".

subcellular_assay

Specify name of the subcellular assay in input

sp_network

sp_network

nn_network

nn_network

polygon

Logical. If TRUE, extract segmentation polygons and centroids from Seurat image boundaries and convert them to a Giotto polygon object.

verbose

logical. Default to TRUE object. Default is "Vizgen".

Value

A Giotto object converted from Seurat object with all computations stored in it.

Examples

g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 4. read Giotto image information
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.12
s <- giottoToSeuratV5(g, tech = "Visium")
#> Error: package 'Seurat' is not yet installed
#> 
#>  To install:
#> install.packages(c("Seurat"))
seuratToGiottoV5(s, spatial_assay = "rna")
#> Error: package 'Seurat' is not yet installed
#> 
#>  To install:
#> install.packages(c("Seurat"))