adjust_cnet_set_relayout_gene: Adjust Set nodes then relayout Gene nodes

adjust_cnet_set_relayout_geneR Documentation

Adjust Set nodes then relayout Gene nodes

Description

Adjust Cnet Set nodes then relayout Gene nodes

Usage

adjust_cnet_set_relayout_gene(
  g,
  nodes = NULL,
  x = 0,
  y = 0,
  use_grep = TRUE,
  do_reorder = TRUE,
  spread_labels = TRUE,
  repulse = 4,
  verbose = FALSE,
  ...
)

Arguments

g

igraph Cnet object

nodes

character vector of one or more Set nodes.

x, y

numeric values passed to nudge_igraph_node().

use_grep

logical passed to nudge_igraph_node().

do_reorder

logical indicating whether nodes should be re-positioned within each subcluster by calling reorderIgraphNodes().

spread_labels

logical indicating whether labels should be re-oriented around each node by calling spread_igraph_labels().

repulse

numeric value passed to layout_with_qfr() to indicate the repulsion force. Typical values range between 3 for loosely-packed nodes, and 5 or higher for more closely-packed nodes.

verbose

logical indicating whether to print verbose output.

...

additional arguments are passed to functions nudge_igraph_node(), layout_with_qfr(), spread_igraph_labels(), reorderIgraphNodes().

Details

This function operates on a Cnet igraph object, distinguished by node attribute "nodeType" with value "Gene" for Gene nodes, and "Set" for Set nodes.

This function is intended to help move a Set node to improve visual spacing between nodes, then it re-positions only the Gene nodes using layout_with_qfr(), keeping the Set nodes in fixed positions.

It calls nudge_igraph_node() using arguments ⁠nodes,x,y⁠, then defines the layout coordinates of Set nodes as constraints that therefore are not allowed to change when calling layout_with_qfr(). Note that Gene node coordinates are allowed to change, even if Gene nodes were included in nodes.

See Also

Other jam cnet igraph functions: adjust_cnet_nodeset(), apply_cnet_direction(), apply_nodeset_spacing(), get_cnet_nodeset(), make_cnet_test(), nudge_igraph_node(), rotate_igraph_layout()


jmw86069/jamenrich documentation built on Nov. 6, 2024, 7:07 p.m.