Skip to contents

Merge probability matrix based on annotations

Usage

mergeByGroup(pm, group_df)

Arguments

pm

A numeric matrix. Probability matrix generated by the soft_max function.

group_df

A character matrix. Annotation of the neighboring cells to be used.

Value

A probability matrix, describing the probability of each cell being in each cellular neighborhood.

Examples


data("spe_test")

spe <- readHoodData(spe, anno_col = "celltypes")

fnc <- findNearCells(spe, k = 100)

pm <- scanHoods(fnc$distance)
#> Tau is set to: 22747.4

pm2 <- mergeByGroup(pm, fnc$cells)