fixSetLabels | R Documentation |
Fix Set labels for legibility
fixSetLabels(
x,
wrap = TRUE,
width = 40,
maxNchar = Inf,
suffix = "...",
nodeType = c("Set", "Gene", "any"),
do_abbreviations = TRUE,
adjustCase = TRUE,
lowercaseAll = TRUE,
removeGrep = "^(KEGG|PID|REACTOME|BIOCARTA|NABA|SA|SIG|ST|WP|HALLMARK)[_. ]",
words_from = c("als", "ii", "iii", "iv", "v", "vi", "Vii", "Viii", "ix", "x", "trna",
"rrna", "rna", "dna", "mirna", "mrna", "snrna", "snorna", "scrna", "lincrna", "Il",
"Ecm", "Nk", "Pi3k.Akt", "Akt", "Pi3k", "tgf", "nfkb", "NK.Kappa.B",
"Pi3kaktmtorsignaling", "Pi3kaktmtor", "PI3kakt", "aktmtor", "mtorsignaling",
"Pi3kci", "Pi3kgamma", "Pi 3k", "Ppar(alpha|a)", "Ppar(gamma|g)", "Ppar",
"Udp N Acetyl Glucosamine", "Mtor", "Gpcr", "Gpcrs", "Tnfa|Tnfalpha", "Tnfr1",
"Tnfr2", "Tnfs", "Tnf", "Tnfsf", "Tnfrelated",
"Tgf(beta|b)", "Tgfbr",
"TGF Beta", "Akt1", "Igf1akt", "Foxo", "Hdacs", "Hdac", "Hat", "Hats",
"Nicotinic Acetylcholine Receptors|Acetylcholine Nicotinic Receptors", "G CSF",
"Gm Csf", "M Csf", "IL([0-9]+)[-. _]([0-9]+)pathway", "Jak Stat([1-9]*)",
"Mkk3 6pathway", "MAP([23]*)K([0-9]*)", "P38[ ]*MAPK", "MAPK1 3", "Erk MAPK", "Erk",
"Erks", "Interferon([a-z]*)", "([A-Za-z0-9]+[a-qs-z])mediated", "Lncrna|Lincrna",
"Microrna([s]*)", "125 DIHYDROXYVITAMIN D3", "Tweak", "Er", "Vegfavegfr2",
"Vegfr1 2",
"Vegf", "Vegfr([1-9]*)", "Egfr", "Egfrviii", "Egfegfr",
"Smad2 3(pathway|nuclear)", "Smad2 3", "Nf Kb", "Nfkappab", "C Jun", "C Fos", "Ap 1",
"Apoe", "([AG])tpase", "Kras", "Uv", "Sarscov2", "Sars Cov ([12])", "Sars Cov",
"Covid19", "Cellspecific", "([a-zA-Z0-9]+)like", "([TB]|NK) Cell"),
words_to = c("ALS", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "tRNA",
"rRNA", "RNA", "DNA", "miRNA", "mRNA", "snRNA", "snoRNA", "scRNA", "lincRNA", "IL",
"ECM", "NK", "PI3K/AKT", "AKT", "PI3K", "TGF", "NFKB", "NFKB",
"PI3K/AKT/mTOR Signaling", "PI3K/AKT/mTOR", "PI3K/AKT", "AKT/mTOR", "mTOR Signaling",
"PI3KCI", "PI3Kgamma", "PI3K", "PPARalpha", "PPARgamma", "PPAR", "UDP-GlcNAc",
"mTOR", "GPCR", "GPCRs", "TNFa", "TNFR1", "TNFR2", "TNFs", "TNF", "TNFSF",
"TNF-related", "TGFbeta", "TGFbeta-Receptor",
"TGFbeta", "AKT1", "IGF1/AKT",
"FOXO", "HDACs", "HDAC", "HAT", "HATs", "Nicotinic Acetylcholine Receptors", "G-CSF",
"GM-CSF", "M-CSF", "IL-\\1/IL-\\2 Pathway", "JAK/STAT\\1", "MKK3/MKK6 Pathway",
"MAP\\1K\\2", "p38-MAPK", "MAPK1/MAPK3", "ERK-MAPK", "ERK", "ERKs", "IFN\\1",
"\\1-Mediated", "lncRNA", "microRNA\\1", "1,25-dihydroxyvitamin D3", "TWEAK",
"ER", "VEGFA/VEGFR2", "VEGFR1/VEGFR2", "VEGF", "VEGFR\\1", "EGFR", "EGFRvIII",
"EGF/EGFR", "Smad2/3 \\1", "Smad2/3", "NFKB", "NFKB", "C-jun", "C-fos",
"AP-1", "APOE", "\\1TPase", "KRAS", "UV", "SARS-CoV-2", "SARS-CoV-\\1",
"SARS-CoV", "COVID19", "Cell-Specific", "\\1-Like", "\\1-cell"),
add_from = NULL,
add_to = NULL,
abbrev_from = c("Extracellular.Matrix", "Mitochondri(um|a|al|on)", "Interferon",
"(IL|Interleukin[ ]*)([0-9]+)", "Subsequent", "Signaling (pathway|system)", "Of The",
"^Signaling by ", " Pathway[s]*$", "Expression", "The Role "),
abbrev_to = c("ECM", "Mito", "IFN", "IL-\\2", "", "Signaling", "Of", "", "", "Expr.",
"Role "),
...
)
x |
any of the following objects:
|
wrap |
|
width |
integer value used when |
maxNchar |
|
suffix |
|
nodeType |
|
do_abbreviations |
|
adjustCase |
|
lowercaseAll |
|
removeGrep |
|
words_from , words_to |
|
add_from , add_to |
|
abbrev_from , abbrev_to |
|
... |
additional arguments are passed to |
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.
To use custom from,to replacements, along with the default replacements,
supply the custom replacements with arguments add_from
,add_to
.
To use custom from,to replacements, without applying the defaults,
supply the custom replacements with arguments words_from
,words_to
.
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);
fixSetLabels(x, do_abbreviations=FALSE);
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.