Convert a Seurat V4 object to a Giotto object
Usage
seuratToGiottoV4(
sobject,
spatial_assay = "Spatial",
dim_reduction = c("pca", "umap"),
subcellular_assay = "Vizgen",
sp_network = NULL,
nn_network = NULL,
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
- verbose
logical. Default to TRUE object. Default is
"Vizgen"
.
Examples
m_expression <- Matrix::Matrix(rnorm(100), nrow = 10, sparse = TRUE)
s <- Seurat::CreateSeuratObject(counts = m_expression)
seuratToGiottoV5(s, spatial_assay = "RNA")
#> Warning: data layer is not found and counts layer is used
#> Images for RNA assay not found in the data.
#> Skipping image processing.
#> python already initialized in this session
#> active environment : 'giotto_env'
#> python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#> "/usr/share/miniconda/envs/giotto_env/bin/python"
#> There are non numeric or integer columns for the spatial location
#> input at column position(s): 1
#> The first non-numeric column will be considered as a cell ID
#> to test for consistency with the expression matrix
#> Other non numeric columns will be removed
#> An object of class giotto
#> >Active spat_unit: cell
#> >Active feat_type: rna
#> dimensions : 10, 10 (features, cells)
#> [SUBCELLULAR INFO]
#> [AGGREGATE INFO]
#> expression -----------------------
#> [cell][rna] raw normalized
#> spatial locations ----------------
#> [cell] raw
#>
#>
#> Use objHistory() to see steps and params used