ggnetwork_plot_full: Create interactive network plot start to finish

View source: R/ggnetwork_plot_full.R

ggnetwork_plot_fullR Documentation

Create interactive network plot start to finish

Description

This puts all the functions together from getting the subset of results to creating the final interactive plot.

Usage

ggnetwork_plot_full(
  filters,
  keep_descendants = NULL,
  results = load_example_results(),
  hpo = HPOExplorer::get_hpo(),
  q_threshold = 5e-04,
  effect_threshold = 1,
  columns = HPOExplorer::list_columns(),
  colour_var = "effect",
  size_var = "ontLvl_relative",
  add_ont_lvl_absolute = TRUE,
  add_ont_lvl_relative = TRUE,
  method = c("ggnetwork", "visnetwork"),
  interactive = TRUE,
  verbose = TRUE,
  ...
)

Arguments

filters

A named list, where each element in the list is the name of a column in the data, and the vector within each element represents the values to include in the final data.

keep_descendants

Terms whose descendants should be kept (including themselves). Set to NULL (default) to skip this filtering step.

results

The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results

hpo

Human Phenotype Ontology object, loaded from get_ontology.

q_threshold

The q value threshold to subset the results by.

effect_threshold

The minimum fold change in specific expression to subset the results by.

columns

A named vector of columns in phenos to add to the hoverdata via add_hoverboxes.

colour_var

The column from phenos that you wish to map to node colour.

size_var

Column to scale node size by.

add_ont_lvl_absolute

Add the absolute ontology level of each HPO term. See get_ontology_levels for more details.

add_ont_lvl_relative

Add the relative ontology level of each HPO term. See get_ontology_levels for more details.

method

Method to construct plot with.

interactive

Make the plot interactive.

verbose

Print messages.

...

Arguments passed on to HPOExplorer::make_network_plot

phenos

A data.table containing HPO IDs and other metadata.

label_var

Column containing the label for each node in a graph (e.g. "hpo_name").

show_plot

Show the plot.

hoverbox_column

Name of the new hoverbox column to add.

preferred_palettes

Preferred palettes to use for each column.

Value

A named list of outputs, including a interactive network plot of the selected subset of results from RD EWCE analysis.

Examples

res <- ggnetwork_plot_full(filters = list(CellType = "Microglia"))

neurogenomics/MultiEWCE documentation built on Sept. 28, 2024, 2:27 a.m.