Function to set a spatial enrichment slot
Usage
setSpatialEnrichment(
gobject,
x,
spat_unit = NULL,
feat_type = NULL,
name = "enrichment",
provenance = NULL,
verbose = TRUE,
initialize = TRUE,
...
)
Arguments
- gobject
giotto object
- x
spatEnrObj or list of spatEnrObj to set. Passing NULL will remove a specified set of spatial enrichment information from the gobject.
- spat_unit
spatial unit (e.g. "cell")
- feat_type
feature type (e.g. "rna", "dna", "protein")
- name
name of spatial enrichment results. Default "DWLS"
- provenance
provenance information (optional)
- verbose
be verbose
- initialize
(default = FALSE) whether to initialize the gobject before returning
- ...
additional params to pass
See also
Other spatial enrichment data accessor functions:
getSpatialEnrichment()
Other functions to set data in giotto object:
setCellMetadata()
,
setDimReduction()
,
setExpression()
,
setFeatureInfo()
,
setFeatureMetadata()
,
setGiotto()
,
setGiottoImage()
,
setMultiomics()
,
setNearestNetwork()
,
setPolygonInfo()
,
setSpatialGrid()
,
setSpatialLocations()
,
setSpatialNetwork()
,
set_multiomics()
Examples
g <- GiottoData::loadGiottoMini("vizgen")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#> 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"
spatenrich <- GiottoData::loadSubObjectMini("spatEnrObj")
g <- setSpatialEnrichment(g, spatenrich)
#> > " cluster_metagene " already exists and will be replaced with new spatial
#> enrichment results
#> Setting spatial enrichment [aggregate][rna] cluster_metagene