Get partite/connected graph nodesets defined by shared connections
Usage
get_bipartite_nodeset(
g,
type = "nodeType",
set_nodes = NULL,
sep = ",",
return_type = c("list", "df"),
verbose = FALSE,
...
)Arguments
- g
igraphobject that contains one attribute column with node type.- type
characterstring of the node/vertex attribute that represents the node type.- set_nodes
characterorNULL, which contains the set of node neighbors for the requested nodeset. For example, one might want all nodes that connect withc("A", "B", "C"). Whenset_nodes=NULLthen all nodesets are returned.- sep
characterstring used as a delimiter between node names when defining a nodeset name- return_type
characterstring indicating the type of data to return:"list"returns a list of nodesets, each element in thelistis acharactervector with node names."df"returns adata.framewith more detailed annotation for each node, including nodesets, neighbor nodes, etc.
- verbose
logicalindicating whether to print verbose output.- ...
additional arguments are ignored.
Details
This method is under development, the intent is to bundle edges where a large subset of nodes are all connected to the same node neighbors. A typical graph may not have any two nodes with the same neighbors, but this situation tends to happen much more often with bipartite graphs, where nodes of one type are only permitted to have node neighbors of the other type. It is not required for this method to work, however.
The driving scenario is with Cnet (concept network) plots,
which is a bipartite network with "Gene" and "Set" nodes.
It is fairly common to have multiple genes present in the
same one or few pathways. As a result, these nodes are
most often positioned near each other as a natural
by-product of having the same connected neighbor nodes.
Identifying a nodeset with identical node neighbors enables some other useful operations:
re-positioning, rotating, expanding, compressing the whole nodeset layout to improve network graph aesthetics, node label readability, reducing overlaps
edge bundling to improve visual distinctiveness between multiple nodesets
See also
Other jam igraph functions:
cnet2df(),
cnet2im(),
cnetplotJam(),
cnetplot_internalJam(),
color_edges_by_nodegroups(),
color_edges_by_nodes(),
color_edges_by_nodes_deprecated(),
color_nodes_by_nodegroups(),
communities2nodegroups(),
drawEllipse(),
edge_bundle_bipartite(),
edge_bundle_nodegroups(),
enrichMapJam(),
fixSetLabels(),
flip_edges(),
highlight_edges_by_node(),
igraph2pieGraph(),
jam_igraph(),
jam_plot_igraph(),
label_communities(),
layout_with_qfr(),
layout_with_qfrf(),
mem2emap(),
memIM2cnet(),
mem_multienrichplot(),
nodegroups2communities(),
rectifyPiegraph(),
relayout_with_qfr(),
removeIgraphBlanks(),
removeIgraphSinglets(),
reorderIgraphNodes(),
rotate_igraph_layout(),
spread_igraph_labels(),
subgraph_jam(),
subsetCnetIgraph(),
subset_igraph_components(),
sync_igraph_communities(),
with_qfr()