Functions to FUSING results

Enrichment analysis using multiple databases

Some enrichment analysis tools like Metascape can provide multi-database analysis in one-click (e.g. combining GO, KEGG, Reactome… ). EnrichGT also provides a similar function to achieve this (fuse them). You can provide a list containing multiple enrichment results form EnrichGT or clusterProfiler into egt_recluster_analysis.

Important

Of note, all enriched objects in the same list should from the same gene source. Like the below example, both the res1 and res2 are enriched results from DEGtable$Genes.

Example:

res1 <- egt_enrichment_analysis(genes = DEGtable$Genes,
database = database_GO_BP(org.Hs.eg.db))

res2 <- egt_enrichment_analysis(genes = DEGtable$Genes,
database = database_Reactome(org.Hs.eg.db))

Fused_enrich <- egt_recluster_analysis(list(res1,res2))

After this, you can generate HTML tables to view the fused result (See the HTML reports (gt table)).

Reversed gene sources analyzed by same database

This is a less meticulously crafted feature that performs re-clustering analysis by categorizing and considering various cases, such as intersections, unions, and unrelated sets. The result is a list containing four EnrichGT_obj objects with overlapped enriched terms, unique enrich terms.

# See ?egt_compare_groups for further helps
Result_List <- egt_compare_groups(
  obj.test,
  obj.ctrl,
  name.test = NULL,
  name.ctrl = NULL,
  ClusterNum = 15,
  P.adj = 0.05,
  force = F,
  nTop = 10,
  method = "ward.D2",
)

Example:

DEGexample_UpReg <- DEGexample |> dplyr::filter(pvalue<0.05,log2FoldChange>0.7)
DEGexample_DownReg <- DEGexample |> dplyr::filter(pvalue<0.05,log2FoldChange<(-0.7))
ora_resultUP <- egt_enrichment_analysis(genes = DEGexample_UpReg$...1,database = database_GO_BP(org.Hs.eg.db))
ora_resultDown <- egt_enrichment_analysis(genes = DEGexample_DownReg$...1,database = database_GO_BP(org.Hs.eg.db))
Compared_Result <- egt_compare_groups(ora_resultUP,ora_resultDown)

You can use str(Result_List) to explore what is inside the list. All items inside it is all basic EnrichGT_objs. You can then use the functions from other sections of this tutorial for similar visualizations.

str(Compared_Result,max.level = 2)
List of 4
 $ Overlap_Control:Formal class 'EnrichGT_obj' [package "EnrichGT"] with 8 slots
 $ Overlap_Test   :Formal class 'EnrichGT_obj' [package "EnrichGT"] with 8 slots
 $ Control_Only   :Formal class 'EnrichGT_obj' [package "EnrichGT"] with 8 slots
 $ Test_Only      :Formal class 'EnrichGT_obj' [package "EnrichGT"] with 8 slots
Back to top