plotGRN: Plots the GRN of the in silico system.

View source: R/in_silico_system.R

plotGRNR Documentation

Plots the GRN of the in silico system.

Description

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.

Usage

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
)

Arguments

insilicosystem

The in silico system (see createInSilicoSystem).

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:

  • "TC": plot only regulation of transcription;

  • "TL": plot only regulation of translation;

  • "RD": plot only regulation of RNA decay;

  • "PD": plot only regulation of protein decay;

  • "PTM": plot only regulation of protein post-translational modification;

  • "RegComplexes": plot only binding interactions, i.e. linking the regulatory complexes to their components.

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 visNetwork.

height

See visNetwork.

Value

A visNetwork plot.

Examples

## 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)

oliviaAB/sismonr documentation built on June 25, 2022, 11:59 p.m.