Skip to contents

The function prepares the input for `cluster_communication()` analysis by using DEG results data

Usage

preparing_DEG_list(cluster, p_val, log2FC, gene, universe)

Arguments

cluster

column of the result table of DEG analysis with the data of the clusters under analysis

p_val

column of the result table of DEG analysis with the data of the p-value of the test. Could be either nominal or adjusted p-value

log2FC

column of the result table of DEG analysis with the data of the log2Fold Change

gene

column of the result table of DEG analysis with the names of the genes tested

universe

vector with the names of the genes of interest in the study. This value should be the names in the LR network

Value

The function returns a gene list composed by a vector for each cluster provided. Each vector is composed by the score, calculated as abs(log2FC) * -log10(p-value), named by the respective genes

Details

The function prepares the gene list in a format compatible with the `cluster_communication()` analysis. In detail, the function needs some information obtained from DEG analysis: cluster tested, gene names, p-values, log2(Fold Change). These data will be filtered to consider only the gene of interest in the study (`universe`). The function calculates a score for each gene as: abs(log2FC) * -log10(p-value). If the p-value is 0, this is approximated to 1/10 of the minimum non-zero p-value present in the data. The function returns a gene set list for each cluster, each composed by a vector of scores named after the genes names provided.