visualize_spatial_network {STDistance} | R Documentation |
Visualize spatial relationships between cell types
Description
Visualize spatial relationships between cell types
Usage
visualize_spatial_network(
spatial_data,
sample,
reference_type,
target_type,
x_col = "pxl_row_in_fullres",
y_col = "pxl_col_in_fullres",
type_col = "Epi_strom",
color_palette = c(Macrophage = "#90ee90", Epithelial_cells_A = "#377EB8"),
alpha = 0.7
)
Arguments
spatial_data |
Spatial coordinates data frame |
sample |
Sample name in the spatial transcriptome data |
reference_type |
Reference cell type |
target_type |
Target cell type |
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 |
alpha |
Transparency level for points and lines |
Value
A ggplot object showing the spatial relationships
Examples
visualize_spatial_network(posi, sample="SP8", reference_type="Macrophage",
target_type="Epithelial_cells_A",
x_col = "pxl_row_in_fullres",
y_col = "pxl_col_in_fullres",
type_col = "celltype_ABCDepi",
color_palette = c("Macrophage" = "#90ee90",
"Epithelial_cells_A" = "#377EB8"))
[Package STDistance version 0.6.6 Index]