visualize_subgraph_structure: Interactive association subgraphs visualization

Description Usage Arguments Value Examples

View source: R/visualize_association_network.R

Description

Produces an interactive plot of network structure for all possible subgraph arrangements for passed association pairs with summary statistics to guide exploration of cut-points.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
visualize_subgraph_structure(
  association_pairs,
  node_info,
  subgraph_results,
  trim_subgraph_results = TRUE,
  warn_of_mismatches = TRUE,
  width = "100%",
  height = "800px",
  default_step = "min_max_rule"
)

Arguments

association_pairs

dataframe with columns a and b representing the ids of the variables or nodes and columns strength that is a numeric indicator of strength of association (higher = stronger).

node_info

Optional dataframe that has a column id that corresponds to the variables codded in a and b of association_pairs that contains additional info nade available on hover in visualization.

subgraph_results

Dataframe of subgraph results as returned by calculate_subgraph_structure. If it isnt provided it is calculated. Automatic calculation will slow down code depending on how large dataset is.

trim_subgraph_results

Should subgraph results after a giant subgraph has taken over be filtered out? Rule for filtering is at least 10% of the variables are in subgraphs and largest subgraph contains less than 95% of all variables in subgraphs. Allows for easier investigating of the subgraph structure over strength.

warn_of_mismatches

If there are differences in the ids present in association_pairs and node_info should a warning be issued?

width, height

Valid css units for output size (e.g. pixels (px) or percent(%)).

default_step

How should the default starting position of the visualization be decided. Options are min_max_rule which tends to result in lots of small subgraphs that are easier to parse, giant_component_local which tries to detect when a giant component first forms based on seen number of nodes. giant_component_global uses same logic as giant_component_local just the threshold for a giant component is based on all possible nodes rather than those seen. This gives the most accurate clusterings if true cluster structure is non-hierarchical. Alternatively you can provided the step as an integer value.

Value

Interactive javascript visualization of association network subgraphs at all possible cut-points

Examples

1
2
3
4
5
6
node_info <- dplyr::rename(virus_host_viruses, id = virus_id)
node_info$color <- ifelse(node_info$type == "RNA", "orangered", "steelblue")
visualize_subgraph_structure(
  virus_net,
  node_info = node_info
)

nstrayer/entropynet documentation built on Oct. 12, 2020, 2:20 a.m.