computeRegionDistance: Compute the region distance based on the spatial locations of...

View source: R/modeling.R

computeRegionDistanceR Documentation

Compute the region distance based on the spatial locations of each splot/cell of the spatial transcriptomics

Description

Compute the region distance based on the spatial locations of each splot/cell of the spatial transcriptomics

Usage

computeRegionDistance(
  coordinates,
  group,
  trim = 0.1,
  interaction.length = NULL,
  spot.size = NULL,
  spot.size.fullres = NULL,
  k.min = 10
)

Arguments

coordinates

a data matrix in which each row gives the spatial locations/coordinates of each cell/spot

group

a factor vector defining the regions/labels of each cell/spot

trim

the fraction (0 to 0.25) of observations to be trimmed from each end of x before computing the average distance per cell group.

interaction.length

The maximum interaction/diffusion length of ligands. This hard threshold is used to filter out the connections between spatially distant regions

spot.size

theoretical spot size; e.g., 10x Visium (spot.size = 65 microns)

spot.size.fullres

The number of pixels that span the diameter of a theoretical spot size in the original,full-resolution image.

k.min

the minimum number of interacting cell pairs required for defining adjacent cell groups

Value

A square matrix giving the pairwise region distance


sqjin/CellChat documentation built on Nov. 10, 2023, 4:29 a.m.