plot_localized {SpaCCI}R Documentation

Plot Localized Hotspot Pattern

Description

Visualize the inferred cell-cell interaction localized pattern if NOT using Seurat Object

Usage

plot_localized(
  spatial_coord,
  resultdf_list,
  RegionIDs_matrix,
  celltype_ligand,
  celltype_receptor,
  plot_size,
  L_R_pair_name = NULL,
  alpha = 0.05
)

Arguments

spatial_coord

A data frame of the spatial coordinates. The columns should include "Spot_ID", "imagerow", and "imagecol". And the row names must be the names of "Spot_ID", which is the same as the rownames in cell type proportion data frame or the colnames of the gene* spot expression data frame

resultdf_list

A result of data frame list from the output of run_SpaCCI(..., analysis_scale = "local",...) `dataframelist`

RegionIDs_matrix

A result of matrix list from the output of run_SpaCCI(..., analysis_scale = "local",...) `RegionIDs_matrix`

celltype_ligand

Ligand cell type string inputted by user, the name of the cell type should match the names in the `spot_cell_proportion_dataframe` during the run_SpaCCI analysis.

celltype_receptor

Receptor cell type string inputted by user, the name of the cell type should match the names in the `spot_cell_proportion_dataframe` during the run_SpaCCI analysis.

plot_size

As this function incorporate with Seurat's `SpatialFeaturePlot`, this parameter could control the plotting size of the each spot.

L_R_pair_name

Initially this is set to NULL, if one is interested in a specific Ligand-Receptor pair, then one could specify the L_R_pair_name here. Note: the input name should match the L-R pair name exists in the dataframe in the output of SpaCCI_local "dataframelist".

alpha

This is the significant cutoff for the adjusted-p-value of thr permutation test. Initially this is set to 0.05, one could adjust the cutoff.

Value

The localized plot from the inferred cell-cell interaction on the local scale.

Examples


# Run localized hotspot plot
Result <- run_SpaCCI(..., analysis_scale = "local",...)
local_plot <- plot_localized(spatial_coord = spatial_coords_df,
                            resultdf_list = Result$dataframelist,
                            RegionIDs_matrix = Result$RegionIDs_matrix,
                            celltype_ligand = "Beta_cells",
                            celltype_receptor = "T_ells",
                            plot_size = 3)



[Package SpaCCI version 1.0.2 Index]