View source: R/in_silico_system.R
plotGRN | R Documentation |
Plots the gene regulatory network of the insilico system as an interactive html graph, with information about the genes and
regulatory relationships displayed on hover. Produces a visNetwork
plot.
plotGRN( insilicosystem, nodes_label = NULL, nodes_colour = c(TC = "#FF834A", TL = "#579BDB", RD = "#FFB746", PD = "#7DCCFF", PTM = "#4BC095", MR = "#EC99C6"), wiggly_nodes = FALSE, edgeType = NULL, showAllVertices = TRUE, show_legend = TRUE, width = NULL, height = NULL )
insilicosystem |
The in silico system (see |
nodes_label |
Named character vector; each element is the label to display for a node in the GRN. For a gene, the name of the vector element should be the gene ID, e.g. c("1" = "Gene 1"). For a regulatory complex, the name of the vector element should be the complex ID, e.g. c("CTC1" = "Regulatory complex 1"). Can be provided for only a subset of the nodes. For the nodes for which a label is not provided, their ID will be displayed instead. |
nodes_colour |
Named character vector; colours to be used for each possible biological function of the genes and regulatory complexes. Must be of length 6, with names: 'TC', 'TL', 'RD', 'PD', 'PTM', 'MR'. |
wiggly_nodes |
Boolean. Should the nodes be "wiggly" (i.e. should the physics be enabled for the nodes in the graph)? Default value is FALSE. |
edgeType |
The type of interactions to plot. If NULL (default value), all the interactions are plotted. Otherwise, can be either:
|
showAllVertices |
Display vertices (nodes) that don't have any edge? Default is FALSE. |
show_legend |
Boolean, should a legend be displayed? Default value is TRUE. |
width |
See |
height |
See |
A visNetwork
plot.
## Not run: mysystem = createInSilicoSystem(G = 10) plotGRN(mysystem) plotGRN(mysystem, wiggly_nodes = TRUE) plotGRN(mysystem, edgeType = "TC") plotGRN(mysystem, edgeType = "TC", showAllVertices = T) ## Save the interactive plot as an HTML file visNetwork::visSave(plotGRN(mysystem), file = "GRN_plot.html") ## Save a static version of the plot visNetwork::visExport() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.