Produces a data.frame with mixing scores of inputed reference and target cells from a SingleCellExperiment object. It calculates reference-target interactions and reference-reference interactions based on default radius of 20. It derives the mixing score and normalises the score by (mixing score) * (number of reference cells) * 2 / (number of target cells). Function returns NA if the mixing score is being calculated between cells of the same type

mixing_score_summary(
  sce_object,
  reference_marker,
  target_marker,
  radius = 20,
  column
)

Arguments

sce_object

SingleCellExperiment object in the form of the output of format_image_to_sce

reference_marker

Cell types of the reference cells

target_marker

Cell types of the target cells

radius

The maximum radius around a reference marker for another cell to be considered an interaction.

column

String specifying the column with the desired cell type annotations

Value

A data.frame of cell numbers, mixing scores, and normalised mixing scores.