findSDEGS: Spatial Differential Gene Expression

View source: R/f.R

findSDEGSR Documentation

Spatial Differential Gene Expression

Description

Identifies spatially differentially expressed genes (SDEGs) as suggested by Zeng et al. (2023).

Usage

findSDEGS(
  object,
  id,
  distance = NA_integer_,
  binwidth = NA_integer_,
  n_bins_dist = NA_integer_,
  angle_span = c(0, 360),
  genes_rm = character(0),
  variable.features.n = 3000,
  method_de = "wilcox",
  base = 2,
  ...
)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

id

Character value. The spatial annotation of interest.

distance

Distance measure. Specifies the distance from the border of the spatial annotation to the horizon in the periphery up to which the screening is conducted. Defaults to a distance that covers the whole tissue section the spatial annotation is located on using distToEdge(). (This distance must not be exceeded.)

angle_span

Numeric vector of length 2. Confines the area screened by an angle span relative to the center of its closest spatial annotation.

method_de

Character value. Denotes the method to according to which the de-analysis is performed. Given to argument test.use of the Seurat::FindAllMarkers()-function. Run SPATA::dea_methods to obtain all valid input options.

...

Used to absorb deprecated arguments or functions.

Details

Groups the data points in spatial intervals depending on their distance to the spatial annotation up to a specified distance. Then gene expression is tested across the created groups as well as in 1v1 comparison to data points outside the interval based groups (group control).

How distance binning works: To bin data points according to their localisation to the spatial annotation two of the following three parameters are required (the third one is calculated):

  • distance: The distance from the border of the spatial annotation to the horizon in the periphery up to which the screening is conducted.

  • binwidth: The width of every bin.

  • n_bins_dist: The number of bins that are created.

These three parameters stand in the following relation to each other:

  1. n_bins_dist = distance / binwidth

  2. distance = n_bins_dist * binwidth

  3. binwidth = distance / n_bins_dist

Value

An S4 object of class SDEGS storing the results.

References

Zeng, H., Huang, J., Zhou, H. et al. Integrative in situ mapping of single-cell transcriptional states and tissue histopathology in a mouse model of Alzheimer's disease. Nat Neurosci 26, 430-446 (2023).


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.