plotnet: plotNet

plotNetR Documentation

plotNet

Description

Plot the network stored in the biotext object with changing the visualization parameters.

Usage

plotNet(
  x,
  layout = "nicely",
  edgeLink = TRUE,
  edgeLabel = FALSE,
  showLegend = FALSE,
  fontFamily = "sans",
  tagPalette = NULL,
  catColors = NULL,
  queryColor = "grey",
  pal = c("blue", "red"),
  colorize = FALSE,
  discreteColorWord = FALSE,
  useSeed = 42,
  autoScale = FALSE,
  scaleRange = c(5, 10),
  scaleEdgeWidth = c(1, 3),
  naEdgeColor = "grey",
  colorText = FALSE,
  asis = FALSE
)

## S4 method for signature 'biotext'
plotNet(
  x,
  layout = "nicely",
  edgeLink = FALSE,
  edgeLabel = FALSE,
  showLegend = FALSE,
  fontFamily = "sans",
  tagPalette = NULL,
  catColors = NULL,
  queryColor = "grey",
  pal = c("blue", "red"),
  colorize = FALSE,
  discreteColorWord = FALSE,
  useSeed = 42,
  autoScale = FALSE,
  scaleRange = c(5, 10),
  scaleEdgeWidth = c(1, 3),
  naEdgeColor = "grey",
  colorText = FALSE,
  asis = FALSE
)

Arguments

x

biotextgraph object

layout

the layout for the network, defaul to "nicely". It can be one of the layouts implemented in 'igraph' and 'ggraph', such as 'kk' (Kamada-Kawai), 'nicely' (automatic selection of algorithm), 'drl' (the force-directed DrL layout). The options are available at: https://igraph.org/r/doc/layout_.html

edgeLink

if FALSE, use geom_edge_diagonal. if TRUE, geom_edge_link. Default to TRUE.

edgeLabel

if TRUE, plot the edge label (default: FALSE)

showLegend

whether to show legend in the network

fontFamily

font family to use, default to "sans".

tagPalette

tag palette when 'tag' is TRUE. It is also used for dependency network using udpipe, and tagging colorization for word cloud. Default to NULL, which indicates automatically set.

catColors

colors for words and texts when colorize is TRUE and discreteColorWord is TRUE

queryColor

color for associated queries with words

pal

palette for color gradient in correlation network. should be a vector of length two like c("red","blue").

colorize

color the word nodes by their frequency, and the other nodes by their category. if colorize=FALSE and addFreqToGene=TRUE, gene nodes are colorized according to the minimum frequency of the words in the network

discreteColorWord

colorize words by "Words" category, not frequency.

useSeed

random seed

autoScale

scale the label and node size automatically for the large network.

scaleRange

scale for label and node size in the network.

scaleEdgeWidth

scale for edge width

naEdgeColor

edge colors for NA values (linking query with the category other than text)

colorText

color text label based on frequency in the network

asis

plot the original network (default to FALSE)

Details

The function accepts the already calculated biotext object and outputs the visualization based on the specified parameters.

Value

biotext object with network visualization changed

Examples

library(ggraph)
geneList <- c("DDX41","PNKP","ERCC1","IRF3","XRCC1")
test <- refseq(geneList)
plotNet(test, asis=TRUE)

noriakis/wcGeneSummary documentation built on May 31, 2024, 4:42 p.m.