Centrality-based KEGG enrichment analysis
Usage
retrieve_all_kegg_graphs(organism = "hsa")
ora_kegg_topology(
genes,
universe = NULL,
centrality = igraph::degree,
organism = "hsa",
pl = NULL,
nperm = 1000,
min_hits = 3,
min_size = 5,
max_size = 2500,
verbose = TRUE
)
gsea_kegg_topology(
s,
centrality = igraph::degree,
null_side = c("both", "right", "left"),
abs = TRUE,
organism = "hsa",
pl = NULL,
nperm = 1000,
min_size = 5,
max_size = 2500,
verbose = TRUE
)Arguments
- organism
KEGG organism code.
- genes
A vector of genes, must be in the EntreZ ID type.
- universe
A vector of universe genes. If it is not specified, the total genes in the KEGG pathways are used.
- centrality
Centrality method. The value should be a function which accepts an
igraphobject and returns a vector of centrality values.- pl
A list of KEGG pathways as
igraphobjects. If the organism is one of "hsa", "mmu" or "rno", the correspondingplis already generated and will be loaded automatically. For other organisms, useretrieve_all_kegg_graphs()to generate one.- nperm
Number of permutations.
- min_hits
Minimal number of the overlapping genes in
genesand pathways.- min_size
Minimal number of genes in pathways.
- max_size
Maximal number of genes in pathways.
- verbose
Whether to print messages?
- s
A numeric vector of gene scores. Names must be in the EntreZ ID type.
- null_side
How to calculate p-values?
- abs
Whether use absolute values of
s?
Details
The following lists several useful centrality measures, written as functions. They can be assigned to the centrality argument.
in-degree:
function(g) igraph::degree(g, mode = "in")out-degree:
function(g) igraph::degree(g, mode = "out")betweenness:
igraph::betweennesspage rank:
igraph::page_rankin-reach:
function(g) CePa::reach(g, mode = "in")out-reach:
function(g) CePa::reach(g, mode = "out")
And many more in the igraph and CePa packages.
ora_kegg_topology() is the ORA-extension.
gsea_kegg_topology() is the GSEA extension. The geneset-level score is calculated as mean(abs(s*w)).