Skip to contents

The function build a gene-set list compatible with `gs_cross-talk()` for cross-talk calculation starting from a provided gene set database and genes (with weights) of interest.

Usage

build_S_list(S_tab, g_u, universe, min_size = 1, max_size = 500)

Arguments

S_tab

a table composed by two (mandatory) or three columns: the first contain the names of the gene sets, the second the name of the genes. The third column (if provided) should be the gene weights. If `ncol(S_tab) == 3`, `g_u` param is ignored weights in the gene sets (i.e.: cell-cell communication), there should be a third column with the weights of each gene in the gene sets.

g_u

named vector. Should contain the genes (as names) and their weights. Ignored if `ncol(S_tab) == 3`.

universe

genes in the adjacency matrix that will be used in `gs_cross_talk()`. Set to `NULL` to skip filtering

min_size, max_size

filtering the gene sets to maintain only the ones that have at least `min_size` or less than `max_size` number of genes. Set to `NULL` to skip filtering

Value

The output is a gene-set list with a vector for each gene-set, composed by weights named after the genes

Details

`build_S_list()` uses a gene-set database data to build the list needed by `gs_cross_talk()` for cross-talk calculation.