apply_cnet_direction | R Documentation |
Apply Cnet border color by directionality
apply_cnet_direction(
cnet,
hitim = NULL,
col = circlize::colorRamp2(breaks = c(-1, 0, 1), colors = c("blue", "grey80",
"firebrick3")),
col_l_max = 80,
hide_solo_pie = TRUE,
frame_blank = default_igraph_values()$vertex$frame.color,
frame_lwd_blank = 0.2,
border_lwd = 2,
do_reorder = FALSE,
...
)
cnet |
|
hitim |
|
col |
|
col_l_max |
|
hide_solo_pie |
|
frame_blank |
|
frame_lwd_blank |
|
border_lwd |
|
do_reorder |
|
... |
additional arguments are passed to |
This function specifically requires the "pie.color"
node attribute of the cnet
object igraph
is populated
with a list
of colors whose name is the enrichment,
and matches colnames(hitim)
of the supplied hit
incidence matrix.
The node names V(cnet)$name
also must match rownames(hitim)
,
otherwise the "pie.border"
and "coloredrect.border"
is assigned
its previous value.
In that case "frame.color"
retains its original value.
This function may be run multiple times with different hitim
,
for example using geneIMdirection
and enrichIMdirection
in two steps.
When there are multiple colors for a given node, they are populated in
node attributes "pie.border"
in list
form. For these nodes,
the attribute "frame.color"
is set to NULL
so it is not displayed
on top of the pie wedge colors.
When there are no matching rownames(hitim)
, or all colors
are identical, the "pie.border"
is populated with NULL
,
so the pie wedges do not each show a color. Also for single-wedge
pie nodes, this process avoids drawing a small line at the top
of each node.
Instead the attribute "frame.color"
is populated with the
one unique border color, so that only the outer border is colorized.
Other jam cnet igraph functions:
adjust_cnet_nodeset()
,
adjust_cnet_set_relayout_gene()
,
apply_nodeset_spacing()
,
get_cnet_nodeset()
,
make_cnet_test()
,
nudge_igraph_node()
,
rotate_igraph_layout()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.