Combined Results Graph

combined_results_graph(
  combined_df,
  selected_terms = "common",
  use_description = FALSE,
  layout = "stress",
  node_size = "num_genes"
)

Arguments

combined_df

Data frame of combined pathfindR enrichment results

selected_terms

the vector of selected terms for creating the graph (either IDs or term descriptions). If set to "common", all of the common terms are used. (default = "common")

use_description

Boolean argument to indicate whether term descriptions (in the "Term_Description" column) should be used. (default = FALSE)

layout

The type of layout to create (see ggraph for details. Default = "stress")

node_size

Argument to indicate whether to use number of significant genes ("num_genes") or the -log10(lowest p value) ("p_val") for adjusting the node sizes (default = "num_genes")

Value

a ggraph object containing the combined term-gene graph. Each node corresponds to an enriched term (orange if common, different shades of blue otherwise), an up-regulated gene (green), a down-regulated gene (red) or a conflicting (i.e. up in one analysis, down in the other or vice versa) gene (gray). An edge between a term and a gene indicates that the given term involves the gene. Size of a term node is proportional to either the number of genes (if node_size = "num_genes") or the -log10(lowest p value) (if node_size = "p_val").

Examples

combined_results <- combine_pathfindR_results(RA_output,
                                              RA_comparison_output,
                                              plot_common = FALSE)
#> You may run `combined_results_graph()` to create visualizations of combined term-gene graphs of selected terms
g <- combined_results_graph(combined_results, selected_terms = sample(combined_results$ID, 3))