Get partite/connected graph nodesets defined by shared connections
get_bipartite_nodeset(
g,
type = "nodeType",
set_nodes = NULL,
sep = ",",
return_type = c("list", "df"),
verbose = FALSE,
...
)
igraph
object that contains one attribute column with
node type.
character
string of the node/vertex attribute that
represents the node type.
character
or NULL
, which contains the set
of node neighbors for the requested nodeset. For example,
one might want all nodes that connect with c("A", "B", "C")
.
When set_nodes=NULL
then all nodesets are returned.
character
string used as a delimiter between
node names when defining a nodeset name
character
string indicating the type of
data to return:
"list"
returns a list of nodesets, each element in the list
is a character
vector with node names.
"df"
returns a data.frame
with more detailed annotation
for each node, including nodesets, neighbor nodes, etc.
logical
indicating whether to print verbose output.
additional arguments are ignored.
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
Other jam igraph functions:
cnet2df()
,
cnet2im()
,
cnetplotJam()
,
cnetplot_internalJam()
,
color_edges_by_nodegroups()
,
color_edges_by_nodes_deprecated()
,
color_edges_by_nodes()
,
color_nodes_by_nodegroups()
,
communities2nodegroups()
,
drawEllipse()
,
edge_bundle_bipartite()
,
edge_bundle_nodegroups()
,
enrichMapJam()
,
fixSetLabels()
,
flip_edges()
,
igraph2pieGraph()
,
jam_igraph()
,
jam_plot_igraph()
,
label_communities()
,
layout_with_qfrf()
,
layout_with_qfr()
,
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()