View source: R/network-overlap.R
| network_overlap | R Documentation |
network_overlap() treats edges as undirected, collapses reciprocal and
duplicate adjacency-list entries, and compares the resulting exact edge and
vertex sets. Curated, experimental, and computational networks may have low
exact overlap because each contains false-positive edges and misses real
interactions. Overlap is therefore a structural comparison, not an absolute
performance measure; use nea_member_recovery_benchmark() for pathway-member
recovery. The function draws Venn diagrams for up to five networks by
default and switches to UpSet-style plots for larger comparisons. Venn
panels use expanded side margins and adaptive text for long names. Network
labels include the corresponding total numbers of vertices or edges.
network_overlap(
networks,
plot = TRUE,
plot_type = c("auto", "venn", "upset", "both"),
max_intersections = 30L,
case_sensitive = FALSE,
colors = "style",
opacity = 0.3,
normalize = FALSE
)
networks |
Named list containing two or more networks. Each network may
be an undirected igraph, a legacy named adjacency list with |
plot |
Draw the vertex and edge overlap plots. |
plot_type |
One of |
max_intersections |
Maximum number of observed intersections shown in each UpSet-style plot. All observed intersections are still returned as tables. |
case_sensitive |
Identifier case policy used when |
colors |
Colors passed to |
opacity |
Venn region opacity between zero and one. |
normalize |
Re-normalize network node identifiers. The default is
|
Invisibly, a list with per-network summaries and exact vertex and
edge sets, intersection tables, and intersection members. In an
intersection pattern, positions correspond to names(networks) and 1
denotes membership.
nea_member_recovery_benchmark(), node_degrees(), topology_2nd()
first <- list(links = list(a = "b", b = c("a", "c"), c = "b"),
Ntotal = 2)
second <- list(links = list(b = "c", c = c("b", "d"), d = "c"),
Ntotal = 2)
overlap <- network_overlap(list(first = first, second = second), plot = FALSE)
overlap$vertices$table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.