Find_regional_IDs {SpaCCI}R Documentation

Find the spatial neighborhood Spot IDs

Description

This function identifies the spatial neighborhood Spot IDs around a given center Spot ID within a specified radius.

Usage

Find_regional_IDs(
  object,
  spatial_coord,
  centerID,
  enhanced = FALSE,
  radius,
  avern = 5
)

Arguments

object

An object that could be either 1. A Seurat object, or 2. A data frame where the columns are Spot_IDs (i.e., the gene*spot expression matrix).

spatial_coord

A data frame of the spatial coordinates. The column names should include 'c("Spot_ID", "imagerow", "imagecol")', and the row names must be the Spot_ID, which is the same as the row names in the cell type proportion data frame or the column names of the gene*spot expression data frame.

centerID

A vector of length 1, representing a single Spot_ID that serves as the center for the neighborhood.

enhanced

Logical; if 'TRUE', enhances the Seurat object by marking the neighborhood in a special way. Defaults to 'FALSE'.

radius

The radius of the spatial neighborhood, specified as a numeric value.

avern

Numeric; the number of samples to average over when determining the unit distance. Defaults to 5.

Value

A list containing:

centerID

The input center Spot_ID.

closeID

The Spot_IDs of the neighboring spots within the specified radius.

unit

The unit distance used to determine the neighborhood.


[Package SpaCCI version 1.0.4 Index]