Convert MultiEnrichment incidence matrix to Cnet plot
memIM2cnet(
memIM,
categoryShape = c("pie", "coloredrectangle", "circle", "ellipse"),
geneShape = c("pie", "coloredrectangle", "circle", "ellipse"),
categoryColor = "#E5C494",
geneColor = "#B3B3B3",
categoryLabelColor = "darkblue",
geneLabelColor = "grey25",
categorySize = 6,
geneSize = 3,
categoryCex = 0.8,
geneCex = 0.5,
frame_darkFactor = NULL,
geneIM = NULL,
geneIMcolors = NULL,
geneIMdirection = NULL,
enrichIM = NULL,
enrichIMcolors = NULL,
enrichIMdirection = NULL,
coloredrect_nrow = 1,
coloredrect_ncol = NULL,
coloredrect_byrow = TRUE,
colorV = NULL,
direction_col = colorjam::col_div_xf(1.2),
hide_solo_pie = TRUE,
remove_blanks = TRUE,
spread_labels = FALSE,
repulse = 3.5,
verbose = FALSE,
...
)
mem2cnet(
memIM,
categoryShape = c("pie", "coloredrectangle", "circle", "ellipse"),
geneShape = c("pie", "coloredrectangle", "circle", "ellipse"),
categoryColor = "#E5C494",
geneColor = "#B3B3B3",
categoryLabelColor = "darkblue",
geneLabelColor = "grey25",
categorySize = 6,
geneSize = 3,
categoryCex = 0.8,
geneCex = 0.5,
frame_darkFactor = NULL,
geneIM = NULL,
geneIMcolors = NULL,
geneIMdirection = NULL,
enrichIM = NULL,
enrichIMcolors = NULL,
enrichIMdirection = NULL,
coloredrect_nrow = 1,
coloredrect_ncol = NULL,
coloredrect_byrow = TRUE,
colorV = NULL,
direction_col = colorjam::col_div_xf(1.2),
hide_solo_pie = TRUE,
remove_blanks = TRUE,
spread_labels = FALSE,
repulse = 3.5,
verbose = FALSE,
...
)
numeric
matrix, or mem
output in list
format. When
mem
format is supplied, relevant arguments which are empty will
use corresponding data from mem
, for example geneIM
, geneIMcolors
,
enrichIM
, enrichIMcolors
.
character
string indicating the
preferred default node shape. In general, pie
shapes with one segment
are converted to circle
for simplicity during plot functions,
although when using jam_igraph()
to plot, it will treat single-segment
pie nodes as circle anyway, and vectorizes pie node plotting to
make the overall rendering time substantially faster.
character
R color for default node colors,
used when geneIMcolors
,enrichIMcolors
is not supplied, respectively.
character
R color used as
default node label color.
numeric
default node size.
numeric
adjustment to default node label
font size.
numeric
passed to jamba::makeColorDarker()
so the frame color is slightly darker than the node fill color.
matrix
objects typically associated with mem
output from
multiEnrichMap()
, however they are optional so this function
can be applied broadly to any incidence matrix.
geneIMcolors
is used to define gene (row) node colors
enrichIMcolors
is used to define set (column) node colors
geneIMdirection
,enrichIMdirection
is used to define optional
border colors defined by the direction, where -1 is down, 0 is no change, and
+1 is up. Use direction_col
to define a custom color function.
arguments
used when geneShape="coloredrectangle"
, to define layout and
placement of colors across columns in geneIMcolors
. By default,
one row of colors is used.
character
optional vector of R colors, named by enrichment
names that appear in colnames(enrichIM)
when supplied. When
defined, these colors override those defined in enrichIMcolors
.
logical
indicating whether to remove blank
subsections from each node, by calling removeIgraphBlanks()
.
logical
indicating whether to call
spread_igraph_labels()
to orient labels radially away from incoming
edges.
logical
indicating whether to print verbose output.
additional arguments are passed to downstream functions:
when remove_blanks=TRUE
it is passed to removeIgraphBlanks()
when spread_labels=TRUE
it is passed to spread_igraph_labels()
igraph
object with Concept network data, containing
pathways connected to genes. Each node has attribute "nodeType"
of either "Set"
or "Gene"
.
This function takes list
output from multiEnrichMap()
and uses three elements to create a Cnet plot:
"memIM"
gene-pathway incidence matrix
"geneIM"
the gene incidence matrix
"enrichIM"
the pathway enrichment matrix
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()
,
get_bipartite_nodeset()
,
igraph2pieGraph()
,
jam_igraph()
,
jam_plot_igraph()
,
label_communities()
,
layout_with_qfrf()
,
layout_with_qfr()
,
mem2emap()
,
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()