exvar.celltocell.interactions: Constructs an explanatory variable representing density of a...

View source: R/CSIDE_utils.R

exvar.celltocell.interactionsR Documentation

Constructs an explanatory variable representing density of a cell type

Description

This explanatory variable can be used with CSIDE to detect cell-to-cell interactions. Density is computing using an exponentially-decaying filter. Currently only works for doublet mode RCTD.

Usage

exvar.celltocell.interactions(myRCTD, barcodes, cell_type, radius = 50)

Arguments

myRCTD

an RCTD object with annotated cell types e.g. from the run.RCTD function.

barcodes

the barcodes, or pixel names, of the SpatialRNA for which to evaluate the explanatory variable. These would be the pixels used in the C-SIDE model.

cell_type

the cell type (character) for which to compute density.

radius

(default 50) the radius of the exponential filter. Approximately, the distance considered to be a relevant interaction.

Value

explanatory.variable a named numeric vector representing the explanatory variable used for explaining differential expression in CSIDE. Names of the variable are the SpatialRNA pixel names, and values are standardized between 0 and 1. This variable represents density of the selected cell type.


dmcable/RCTD documentation built on Feb. 24, 2024, 11:03 p.m.