plot_SpaCCI_local {SpaCCI} | R Documentation |
Plot SpaCCI Localized Interaction Results
Description
This function provides a unified interface to visualize the localized cell-cell interaction patterns inferred by SpaCCI, either using a Seurat object with a spatial image or a spatial coordinates data frame.
Usage
plot_SpaCCI_local(
Seurat_Object = NULL,
spatial_coordinates_dataframe = NULL,
SpaCCI_local_Result_List,
Ligand_cell_type,
Receptor_cell_type,
spot_plot_size,
specific_LR_pair_name = NULL,
significant_cutoff = 0.05
)
Arguments
Seurat_Object |
Optional. A Seurat object containing spatial data. If provided, the function will plot the interaction patterns on the tissue image. |
spatial_coordinates_dataframe |
Optional. A data frame containing the spatial coordinates of the spots. The columns should include |
SpaCCI_local_Result_List |
A list containing the results from a SpaCCI local analysis. This list should include |
Ligand_cell_type |
The name of the ligand cell type to plot. This should match the cell type names used in the |
Receptor_cell_type |
The name of the receptor cell type to plot. This should match the cell type names used in the |
spot_plot_size |
A numeric value controlling the size of the spots in the plot. |
specific_LR_pair_name |
Optional. The name of a specific ligand-receptor pair to plot. If provided, the plot will focus on this interaction. The name should match those in the |
significant_cutoff |
A numeric value specifying the significance cutoff for the adjusted P-values from the permutation test. Default is |
Value
A plot object showing the localized interaction patterns. The plot will be generated using either the Seurat object or the spatial coordinates data frame, depending on the input provided.
Examples
# Plot localized SpaCCI results using Seurat object
library(SpaCCI)
library(dplyr)
data(result_local)
data(result_local_spatial_coords_df)
spatial_coords_df <- result_local_spatial_coords_df
#plot_SpaCCI_local(Seurat_Object = seurat_object,.....)
# Plot localized SpaCCI results using spatial coordinates
plot_SpaCCI_local(spatial_coordinates_dataframe = spatial_coords_df,
SpaCCI_local_Result_List = result_local,
Ligand_cell_type = "ductal",
Receptor_cell_type = "activated_stellate",
spot_plot_size = 3)