Creates an additional metadata column with information about interacting and non-interacting cell types of the selected cell-cell interaction.
addCellIntMetadata(
gobject,
spat_unit = NULL,
feat_type = NULL,
spatial_network = "spatial_network",
cluster_column,
cell_interaction,
name = "select_int",
return_gobject = TRUE
)
giotto object
spatial unit
feature type
name of spatial network to use
column of cell types
cell-cell interaction to use
name for the new metadata column
return an updated giotto object
Giotto object
This function will create an additional metadata column which selects interacting cell types for a specific cell-cell interaction. For example, if you want to color interacting astrocytes and oligodendrocytes it will create a new metadata column with the values "select_astrocytes", "select_oligodendrocytes", "other_astrocytes", "other_oligodendroyctes" and "other". Where "other" is all other cell types found within the selected cell type column.
g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> cell_spatInfo_spatVector.shp
#> cell
#>
#> 3.2 read Giotto spatial centroid information
#> cell
#>
#> 3.3 read Giotto spatial overlap information
#> No overlaps were found, overlap loading will be
#> skipped
#>
#> 4. read Giotto image information
#> a giotto python environment was found
#> Using python path:
#> "/Users/yuanlab/Library/r-miniconda/envs/giotto_env/bin/pythonw"
addCellIntMetadata(g, cluster_column = "leiden_clus",
cell_interaction = "custom_leiden")
#> An object of class giotto
#> >Active spat_unit: cell
#> >Active feat_type: rna
#> [SUBCELLULAR INFO]
#> polygons : cell
#> [AGGREGATE INFO]
#> expression -----------------------
#> [cell][rna] raw normalized scaled
#> spatial locations ----------------
#> [cell] raw
#> spatial networks -----------------
#> [cell] Delaunay_network spatial_network
#> spatial enrichments --------------
#> [cell][rna] cluster_metagene DWLS
#> dim reduction --------------------
#> [cell][rna] pca custom_pca umap custom_umap tsne
#> nearest neighbor networks --------
#> [cell][rna] sNN.pca custom_NN
#> attached images ------------------
#> images : alignment image
#>
#>
#> Use objHistory() to see steps and params used