visualize_spatial_multinetwork {STDistance}R Documentation

Visualize spatial relationships between multiple cell types

Description

Visualize spatial relationships between multiple cell types

Usage

visualize_spatial_multinetwork(
  spatial_data,
  sample,
  reference_type,
  target_types,
  x_col = "pxl_row_in_fullres",
  y_col = "pxl_col_in_fullres",
  type_col = "Epi_strom",
  color_palette = NULL,
  point_alpha = 0.7,
  line_alpha = 0.5,
  point_size = 1.5,
  line_width = 0.3,
  show_legend = TRUE
)

Arguments

spatial_data

Spatial coordinates data frame

sample

Sample name in the spatial transcriptome data

reference_type

Reference cell type (character vector of length 1)

target_types

Target cell type(s) (character vector of 1 or more)

x_col

Column name for x-coordinates

y_col

Column name for y-coordinates

type_col

Column name for cell type information

color_palette

Named vector of colors for cell types

point_alpha

Transparency level for points

line_alpha

Transparency level for connection lines

point_size

Size of points in plot

line_width

Width of connection lines

show_legend

Logical, whether to show legend

Value

A ggplot object showing the spatial relationships

Examples

visualize_spatial_multinetwork(posi, sample="SP8",reference_type="Macrophage",
                     target_type=c("Epithelial_cells_A","Epithelial_cells_B"),
                     type_col = "celltype_ABCDepi")

[Package STDistance version 0.6.6 Index]