View source: R/exportWCNetwork.R
exportWCNetwork | R Documentation |
Export wordcloud networks to Cytoscape.js
exportWCNetwork(
g,
geneList,
dir = "network",
colors = NULL,
sizeMin = 50,
sizeMax = 200,
wcScale = 20,
keyType = "SYMBOL",
orgDb = org.Hs.eg.db,
wcArgs = list(),
numWords = 50
)
g |
igraph (node name corresponding to gene cluster name) |
geneList |
named list of gene IDs |
dir |
directory to output the files, default to current directory |
colors |
color palettes to use for each cluster named list, or random palette will be assigned if NULL |
sizeMin |
minimum scale size for nodes |
sizeMax |
maximum scale size for nodes |
wcScale |
scaling size for wordcloud |
keyType |
type of gene IDs (default to SYMBOL) |
orgDb |
annotation database |
wcArgs |
parameters for ggwordcloud |
numWords |
number of words |
The function exports the wordcloud network by providing the gene cluster network. Node size will be the number of genes in the cluster. By default use cola layout, and see below for the parameters of the layout. (https://github.com/cytoscape/cytoscape.js-cola) If "strength" attribute is in the edge of igraph object, the parameter is used to size the edge width.
export the Cytoscape.js network
g <- igraph::graph_from_edgelist(rbind(c("ME1","ME2")))
gl <- list("ME1"=c("PNKP","IRF3","MCM5"), "ME2"=c("IRF3","ERCC2","TP53"))
exportWCNetwork(g, gl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.