Skip to contents

This function takes in named vectors of all the parent populations in the dataset, and creates a data frame containing all pairwise cell relationships, this data frame can be inputed into the `parentDf` argument in `Kontextual`.

Usage

parentCombinations(all, ...)

Arguments

all

A list of all the `to` cell types Kontextual is evaluated over

...

Vectors of each parent population

Value

A data frame containing all pairwise cell relationships and their corresponding parent

Examples

tcells <- c("CD4", "CD8")
tissue <- c("epithelial", "stromal")
allCells <- c("tumour", tissue, tcells)

parentCombinations(all = allCells, tcells, tissue)
#>          from         to       parent parent_name
#> 1         CD4     tumour     CD4, CD8      tcells
#> 2         CD4 epithelial     CD4, CD8      tcells
#> 3         CD4    stromal     CD4, CD8      tcells
#> 4         CD4        CD8     CD4, CD8      tcells
#> 5         CD8     tumour     CD4, CD8      tcells
#> 6         CD8 epithelial     CD4, CD8      tcells
#> 7         CD8    stromal     CD4, CD8      tcells
#> 8         CD8        CD4     CD4, CD8      tcells
#> 9  epithelial     tumour epitheli....      tissue
#> 10 epithelial    stromal epitheli....      tissue
#> 11 epithelial        CD4 epitheli....      tissue
#> 12 epithelial        CD8 epitheli....      tissue
#> 13    stromal     tumour epitheli....      tissue
#> 14    stromal epithelial epitheli....      tissue
#> 15    stromal        CD4 epitheli....      tissue
#> 16    stromal        CD8 epitheli....      tissue