Visualize 2D cell-cell interactions according to spatial coordinates in ggplot mode
cellProximitySpatPlot2D(
gobject,
spat_unit = NULL,
feat_type = NULL,
spat_loc_name = NULL,
interaction_name = NULL,
cluster_column = NULL,
sdimx = "sdimx",
sdimy = "sdimy",
cell_color = NULL,
cell_color_code = NULL,
color_as_factor = TRUE,
show_other_cells = FALSE,
show_network = FALSE,
show_other_network = FALSE,
network_color = NULL,
spatial_network_name = "Delaunay_network",
show_grid = FALSE,
grid_color = NULL,
spatial_grid_name = "spatial_grid",
coord_fix_ratio = 1,
show_legend = TRUE,
point_size_select = 2,
point_select_border_col = "black",
point_select_border_stroke = 0.05,
point_size_other = 1,
point_alpha_other = 0.3,
point_other_border_col = "lightgrey",
point_other_border_stroke = 0.01,
show_plot = NULL,
return_plot = NULL,
save_plot = NULL,
save_param = list(),
default_save_name = "cellProximitySpatPlot2D"
)
giotto object
spatial unit (e.g. "cell")
feature type (e.g. "rna", "dna", "protein")
spatial locations to use
cell-cell interaction name
cluster column with cell clusters
x-axis dimension name (default = 'sdimx')
y-axis dimension name (default = 'sdimy')
character. what to color cells by (e.g. metadata col or spatial enrichment col)
character. discrete colors to use. palette to use or named vector of colors
logical. convert color column to factor. discrete colors are used when this is TRUE. continuous colors when FALSE.
decide if show cells not in network
show spatial network of selected cells
show spatial network of not selected cells
color of spatial network
name of spatial network to use
show spatial grid
color of spatial grid
name of spatial grid to use
fix ratio between x and y-axis
logical. show legend
size of selected points
border color of selected points
stroke size of selected points
size of other points
opacity of other points
border color of other points
stroke size of other points
logical. show plot
logical. return ggplot object
logical. save the plot
list of saving parameters, see
showSaveParameters
default save name for saving, don't change, change save_name in save_param
ggplot
Description of parameters.
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
#> 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 : '/usr/bin/python3'
#> python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#> "/usr/bin/python3"
g <- createSpatialGrid(g, sdimx_stepsize = 5, sdimy_stepsize = 5)
x <- cellProximityEnrichment(g, cluster_column = "leiden_clus")
cellProximitySpatPlot2D(
gobject = g, cluster_column = "leiden_clus",
interaction_name = x
)