exportWCNetwork: exportWCNetwork

View source: R/exportWCNetwork.R

exportWCNetworkR Documentation

exportWCNetwork

Description

Export wordcloud networks to Cytoscape.js

Usage

exportWCNetwork(
  g,
  geneList,
  dir = "network",
  colors = NULL,
  sizeMin = 50,
  sizeMax = 200,
  wcScale = 20,
  keyType = "SYMBOL",
  orgDb = org.Hs.eg.db,
  wcArgs = list(),
  numWords = 50
)

Arguments

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

Details

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.

Value

export the Cytoscape.js network

Examples

g <- igraph::graph_from_edgelist(rbind(c("ME1","ME2")))
gl <- list("ME1"=c("PNKP","IRF3","MCM5"), "ME2"=c("IRF3","ERCC2","TP53"))
exportWCNetwork(g, gl)

noriakis/wcGeneSummary documentation built on April 22, 2024, 7:12 a.m.