Skip to contents

Network builders

Construct a tidygraph network object from various input types. All builders return a module-annotated graph ready for ggNetView().

build_graph_from_mat()
Build a correlation-based network from a matrix
build_graph_from_double_mat()
Build a graph object from Two numeric matrix
build_graph_from_double_mat_with_module()
Build a graph object from Two numeric matrix
build_graph_from_multi_mat()
Build a graph object from multiple numeric matrices
build_graph_from_adj_mat()
Build a correlation-based network from a adjacency matrix
build_graph_from_adj_mat_module()
Build a graph object from a adjacency matrix and module Info
build_graph_from_df()
Build a graph object from a data frame
build_graph_from_igraph()
Build a graph object from a graph object
build_graph_from_module()
Build a graph object from a data frame and module Info
build_graph_from_wgcna()
Build a graph object from WGCNA result
build_graph_from_pie()
Build a pie graph object from a data frame
build_graph_from_enrichGO()
Build a graph object from GO enrichment analysis
build_graph_from_consensus()
Build a consensus graph object from multiple adjacency matrices
build_graph_from_node_edge()
Build a graph object from separate node and edge tables
build_graph_from_stringdb()
Build a graph object from a STRING database export

Visualisation

Plot networks, heatmaps, and multi-network comparisons.

ggNetView()
Visualize a network with custom layouts
ggNetView_multi()
Visualize network with custom layouts in different samples
ggNetView_multi_link()
Visualize multiple networks and show the connections between them to highlight key members within the networks
gglink_heatmaps()
Multi-orientation species-environment correlation / Mantel heatmap
gglink_heatmaps_2()
Visualize multi-orientation environmental-species correlation heatmaps (adaptive sizing)
gglink_heatmap_triple()
Visualize multi-orientation environmental-species correlation heatmaps2
ggnetview_modularity_heatmaps()
Network + module-environment heatmaps with shared Mantel API
ggnetview_subgraph()
Visualize a network with a magnified (zoomed) module subgraph
ggnetview_zipi()
Compute Zi-Pi (within-module connectivity and participation coefficient)
ggnetview_perturbation_curve()
Plot a network perturbation (attack) curve

Network analysis

Compute topology metrics, extract subgraphs, and perform statistical tests.

get_network_topology()
Create network topology
get_network_topology_parallel()
Create network topology in parallel
get_sample_subgraph()
Extract sample-level subgraphs from a graph object
get_sample_subgraph_topology()
Create sample-level subgraph topology from a global network
get_sample_subgraph_topology_parallel()
Create sample-level subgraph topology in parallel
get_network_perturbation()
Structural perturbation ("virtual attack") of a network
get_node_influence()
Propagate a virtual perturbation from source node(s) across the network
get_node_centrality()
Compute per-node centralities and attach them to a graph object
get_node_ivi()
Compute the Integrated Value of Influence (IVI) per node
press_perturbation()
Press-perturbation (sustained-disturbance) analysis
ggNetView_RMT()
One-shot, non-interactive RMT threshold scan with auto selection
mantel_pairwise() mantel_between_blocks() mantel_block_vs_col()
Mantel test utilities for species-environment distance matrix correlation

Correlation & inference engines

Low-level correlation and network-inference functions powered by Rcpp. These are called internally by the builders but can also be used directly.

sparcc_matrix_rcpp()
SparCC correlation matrix (Rcpp implementation)
sparcc_pvalue_rcpp()
SparCC p-value matrix (Rcpp implementation)
spieceasi_matrix_rcpp()
SPIEC-EASI matrix (Rcpp implementation)

Graph utilities

Extract, transform, reorder, and export graph components.

get_graph_nodes()
Extract node table from graph object
get_graph_adjacency()
Extract adjacency matrix from graph object
get_info_from_graph()
Extract node and edge information from graph object
get_subgraph()
Extract subgrah from graph object
order_graph()
Reorder the Modularity from graph object
update_graph_modules()
Update module names in an existing graph object
update_graph_modules2()
Update module assignments from an existing column in graph object
export_ggnetview()
Save a ggNetView with sensible defaults
trans_adjacency_matrix_to_df()
Trans adjacency matrix to edge data frame
trans_TOM_in_WGCNA()
Translate TOM matrin to create graph object
angle_utils
Angle helpers for ggNetView layout parameters
deg()
Convert degrees to radians

Themes & scales

ggplot2 theme and colour/fill scale helpers for consistent network aesthetics.

theme_ggnetview()
ggNetView Theme
scale_color_ggnetview()
Custom discrete color scale for ggNetView
scale_fill_ggnetview()
Custom discrete fill scale for ggNetView
get_palette()
Generate a named color palette for discrete classes

Datasets

Bundled example data used throughout the documentation, vignettes and \examples.

otu_tab
Example OTU abundance table
otu_rare
Rarefied OTU abundance table
otu_rare_relative
Relative-abundance OTU table
otu_sample
Sample metadata for the OTU example
tax_tab
Taxonomy annotation table
otu_NatureWater
Larger OTU table from a published water-quality study
tax_NatureWater
Taxonomy table for [otu_NatureWater]
BASV_tab
Bacterial ASV demonstration table
FASV_tab
Fungal ASV demonstration table
Spedf
Species composition table for link-heatmap examples
Envdf
Environmental variables (single block)
Envdf_4st
Environmental variables across four sampling stages
Envdf_4st_2
Alternative four-stage environmental dataset
adjacency_matrix_example
Pre-computed adjacency matrix
double_mat_node_df
Two-block node table for double-matrix examples
double_mat_node_df_with_modularity
Two-block node table with pre-computed modularity
ppi_example
Protein-protein interaction example
ppi_module
Protein-protein interaction example with module assignment

Re-exports

`%>%`
Pipe operator