Skip to contents

The infiltration score, or SpatialScore, is defined as the degree to which an infiltrating cell type interacts with a base, or background cell type. This function computes this score between two groups of cell types, termed the infil_group or infiltration group, and bg_group or background group. The function returns a data.frame containing the score.

Usage

infiltrationScore(object, nn, feature, infil_group, bg_group, ...)

infiltrationScore.Region(object, nn, feature, infil_group, bg_group, ...)

Arguments

object

A SpatialMap or Region object

nn

The name of a Nearest Neighbors object

feature

The name of a feature, e.g. from cellMetadata

infil_group

Infiltrating cell types. A character vector that matches elements within feature.

bg_group

Base cell types. A character vector that matches elements within feature.

...

Arguments passed to .smapply

Value

A data.frame containing a score for each group comparison

Details

Specifically, the score is defined as: $$Score = infiltrating_cell~base_cell interactions/base_cell~base_cell interactions$$

Scroll to top