Adjust Set nodes then relayout Gene nodes
Source:R/jamenrich-cnet.R
adjust_cnet_set_relayout_gene.RdAdjust 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
igraphCnet object- nodes
charactervector of one or more Set nodes.- x, y
numericvalues passed tonudge_igraph_node().- use_grep
logicalpassed tonudge_igraph_node().- do_reorder
logicalindicating whether nodes should be re-positioned within each subcluster by callingreorderIgraphNodes().- spread_labels
logicalindicating whether labels should be re-oriented around each node by callingspread_igraph_labels().- repulse
numericvalue passed tolayout_with_qfr()to indicate the repulsion force. Typical values range between3for loosely-packed nodes, and5or higher for more closely-packed nodes.- verbose
logicalindicating 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()