
Find consensus co-expression modules across studies
Source:R/09_downstream.R
mx_coexpression_modules.RdBuilds a gene-gene Pearson correlation matrix on log-CPM expression in each study, combines them into a consensus (by default the element-wise minimum, as in WGCNA consensus networks, so a link must hold in every study), clusters genes hierarchically, and cuts the tree into modules. Each module is summarised by its eigengene (first principal component) in every study; eigengene differences between cases and controls are pooled across studies with a random-effects model.
Usage
mx_coexpression_modules(
studies,
genes = NULL,
n_genes = 2000,
consensus = c("min", "mean"),
cut_height = 0.25,
min_module_size = 20,
meta_result = NULL
)Arguments
- studies
A named list of
metaXpressStudyobjects.- genes
Optional character vector of genes to cluster (e.g. meta-DEGs). Default
NULLuses then_genesmost variable genes shared by all studies.- n_genes
Number of most variable genes to use when
genesisNULL. Default 2000.- consensus
How to combine study correlation matrices:
"min"(conservative, default) or"mean".- cut_height
Tree cut height on the distance \((1 - r)/2\). The default 0.25 groups genes whose average consensus correlation is at least about 0.5.
- min_module_size
Modules smaller than this are merged into module
"M0"(unassigned). Default 20.- meta_result
Optional
metaXpressResult. If given, each module reports the fraction of its genes that are significant meta-DEGs (meta_padj <= 0.05) up or down.
Value
A list with
- modules
data.frameofgene_id,module,kME(mean correlation with the module eigengene across studies).- module_stats
data.framewith one row per module:module,n_genes,meta_g,pvalue,padj,i_squared, per-studyg_<study>,hub_genes, and optionallypct_meta_up,pct_meta_down.- eigengenes
List of per-study sample x module eigengene matrices.
Details
Like mx_cell_composition, a lib_size
column in colData overrides the column sums used for log2-CPM.
References
Langfelder, P. and Horvath, S. (2007) Eigengene networks for studying the relationships between co-expression modules. BMC Systems Biology, 1, 54. doi:10.1186/1752-0509-1-54
Langfelder, P. and Horvath, S. (2008) WGCNA: an R package for weighted correlation network analysis. BMC Bioinformatics, 9, 559. doi:10.1186/1471-2105-9-559