Function to calculate sub-components pathway score
gene_set_cc.Rd
The function calculates the score of each pathway connected components
Arguments
- gs_list
a named list of genes grouped into gene-sets as obtained from `preparing_gs_list`, `preparing_msigdb_list()`, `preparing_DEG_list()` or `preparing_expr_list()` functions
- gene_network_adj
adjacency matrix of the whole gene network considered
- mc_cores_cc
number of threads to be used for cc calculation
Value
The function returns a list of two object:
membership: results of [igraph::components()] for each pathway considered
pathway_cc: a data frame with
pathway: name of the pathway where the components scores are calculated
ID: id of the component of the pathway
score: component score
n_gene: number of genes in the component
n_link: number of links in the component
gene: names of the genes in the component
Details
By coupling the pathway data to the adjacency matrix, the function identifies the pathway components as connected components (see [igraph::components()] for details). For each component, the function calculates the score as described in the article.
Examples
if (FALSE) {
ptw_list <- list(ptwA = c("A", "B","C"), ptwB = c("D", "E", "F"), ptwC = c("A", "B", "E"))
adj <- matrix(data = sample(c(0,1), 6*6, replace = TRUE), nrow = 6,
ncol = 6, dimnames = list(LETTERS[1:6], LETTERS[1:6]))
wgt <- rep(1, 6)
p_cc <- pathway_cc(pathway_list = ptw_list,
gene_network_adj = adj, weight = wgt, mc_cores_cc = 1)
}