visualize_term_interactions: Visualize Interactions of Genes Involved in the Given...

View source: R/visualization.R

visualize_term_interactionsR Documentation

Visualize Interactions of Genes Involved in the Given Enriched Terms

Description

Visualize Interactions of Genes Involved in the Given Enriched Terms

Usage

visualize_term_interactions(result_df, pin_name_path, show_legend = TRUE)

Arguments

result_df

Data frame of enrichment results. Must-have columns are: 'Term_Description', 'Up_regulated' and 'Down_regulated'

pin_name_path

Name of the chosen PIN or absolute/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')

show_legend

Boolean to indicate whether to display the legend (TRUE) or not (FALSE) (default: TRUE)

Details

The following steps are performed for the visualization of interactions of genes involved for each enriched term:

  1. shortest paths between all affected genes are determined (via igraph)

  2. the nodes of all shortest paths are merged

  3. the PIN is subsetted using the merged nodes (genes)

  4. using the PIN subset, the graph showing the interactions is generated

  5. the final graph is visualized using igraph, colored by changed status (if provided), and is saved as a PNG file.

Value

Creates PNG files visualizing the interactions of genes involved in the given enriched terms (annotated in the result_df) in the PIN used for enrichment analysis (specified by pin_name_path). The PNG files are saved in the folder 'term_visualizations' under the current working directory.

See Also

See visualize_terms for the wrapper function for creating enriched term diagrams. See run_pathfindR for the wrapper function of the pathfindR enrichment workflow.

Examples

## Not run: 
visualize_term_interactions(result_df, pin_name_path = 'IntAct')

## End(Not run)

egeulgen/pathfindR documentation built on Feb. 1, 2024, 4:34 a.m.