fixSetLabels | R Documentation |
Fix Set labels for legibility
fixSetLabels(
x,
wrap = TRUE,
width = 25,
maxNchar = Inf,
suffix = "...",
nodeType = c("Set", "Gene", "any"),
adjustCase = TRUE,
removeGrep = "^(KEGG|PID|REACTOME|BIOCARTA|NABA|SA|SIG|ST)[_.]",
words_from = c("als", "ii", "iii", "iv", "v", "tgf", "nfkb", "trna", "rrna", "mirna",
"mrna", "snrna", "snorna", "scrna", "lincrna"),
words_to = c("ALS", "II", "III", "IV", "V", "TGF", "NFKB", "tRNA", "rRNA", "miRNA",
"mRNA", "snRNA", "snoRNA", "scRNA", "lincRNA"),
...
)
x |
character vector, or |
wrap |
logical indicating whether to apply word wrap, based upon
the supplied |
width |
integer value used when |
maxNchar |
numeric value or |
suffix |
character value used as a suffix when |
nodeType |
character value compared to the vertex attribute
|
adjustCase |
logical indicating whether to adjust the uppercase and lowercase lettering. |
removeGrep |
character regular expression pattern used to remove patterns from the resulting label. The default values remove the prefix used in MsigDB canonical pathway names, which is a prefix indicating the source of each pathway. |
words_from , words_to |
character vectors of words to match
in case-insensitive manner, to be replaced with fixed-case
alternatives. It uses perl-based regular expression matching
in |
... |
additional arguments are ignored. |
This function is a convenient wrapper for several steps that edit gene set and pathways labels to be slightly more legible. It operates on either a character vector, or an igraph object.
vector or igraph object, to match the input x
.
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()
,
flip_edges()
,
get_bipartite_nodeset()
,
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()
x <- c("KEGG_INSULIN_SIGNALING_PATHWAY",
"KEGG_T_CELL_RECEPTOR_SIGNALING_PATHWAY",
"KEGG_NEUROTROPHIN_SIGNALING_PATHWAY");
fixSetLabels(x);
jamba::nullPlot();
jamba::drawLabels(txt=x,
preset=c("top", "center", "bottom"));
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.