Build Network Input Data from GO Enrichment and DE Results
build_network_inputs.RdExtracts significant GO terms (adjusted p-value < 0.05) from an
enrichResult object and pairs them with fold-change information from
a differential-expression table. The output is a list containing:
(1) a named list of gene-set members (collection), (2) a data frame
of mean log2 fold-changes per pathway (results_set), and (3) the
unique set of DE genes (de_genes). These three components are the
required inputs for generate_overlap_network.
Arguments
- ego
An
enrichResultobject (or coercible viaas.data.frame) produced byclusterProfiler::enrichGOor a similar ORA function. Must contain columnsDescription,p.adjust, andgeneID(slash-delimited gene symbols).- de_df
A data frame of differentially expressed genes with at least columns
geneandavg_log2FC.
Value
A list with three elements:
- collection
Named list of character vectors; each element contains the gene symbols associated with one GO term.
- results_set
Data frame with one row per GO term and a single column
avg_log2FCgiving the mean fold-change of DE genes in that term's gene set.- de_genes
Character vector of unique DE gene symbols.
Returns NULL if no significant terms pass filtering.