Learn R Programming

pathfindR (version 1.4.2)

visualize_terms: Create Diagrams for Enriched Terms

Description

Create Diagrams for Enriched Terms

Usage

visualize_terms(
  result_df,
  input_processed = NULL,
  hsa_KEGG = TRUE,
  pin_name_path = "Biogrid",
  ...
)

Arguments

result_df

Data frame of enrichment results. Must-have columns for KEGG human pathway diagrams (hsa_kegg = TRUE) are: "ID" and "Term_Description". Must-have columns for the rest are: "Term_Description", "Up_regulated" and "Down_regulated"

input_processed

input data processed via input_processing, not necessary when hsa_KEGG = FALSE

hsa_KEGG

boolean to indicate whether human KEGG gene sets were used for enrichment analysis or not (default = TRUE)

pin_name_path

Name of the chosen PIN or path/to/PIN.sif. If PIN name, must be one of c("Biogrid", "STRING", "GeneMania", "IntAct", "KEGG", "mmu_STRING"). If path/to/PIN.sif, the file must comply with the PIN specifications. (Default = "Biogrid")

...

additional arguments for visualize_hsa_KEGG (used when hsa_kegg = TRUE)

Value

Depending on the argument hsa_KEGG, creates visualization of interactions of genes involved in the list of enriched terms in result_df and saves them in the folder "term_visualizations" under the current working directory.

Details

For hsa_KEGG = TRUE, KEGG human pathway diagrams are created, affected nodes colored by up/down regulation status. For other gene sets, interactions of affected genes are determined (via a shortest-path algorithm) and are visualized (colored by change status) using igraph.

See Also

See visualize_hsa_KEGG for the visualization function of human KEGG diagrams. See visualize_term_interactions for the visualization function that generates diagrams showing the interactions of input genes in the PIN. See run_pathfindR for the wrapper function of the pathfindR workflow.

Examples

Run this code
# NOT RUN {
visualize_terms(result_df, input_processed)
visualize_terms(result_df, hsa_KEGG = FALSE, pin_name_path = "IntAct")
# }

Run the code above in your browser using DataLab