visualizeGRN: Visualize a filtered GRN.

visualizeGRNR Documentation

Visualize a filtered GRN.

Description

Visualize a filtered GRN.

Usage

visualizeGRN(
  GRN,
  outputFolder = NULL,
  basenameOutput = NULL,
  plotAsPDF = TRUE,
  pdf_width = 12,
  pdf_height = 12,
  title = NULL,
  maxRowsToPlot = 500,
  graph = "TF-gene",
  colorby = "type",
  layered = FALSE,
  vertice_color_TFs = list(h = 10, c = 85, l = c(25, 95)),
  vertice_color_peaks = list(h = 135, c = 45, l = c(35, 95)),
  vertice_color_genes = list(h = 260, c = 80, l = c(30, 90)),
  vertexLabel_cex = 0.4,
  vertexLabel_dist = 0,
  forceRerun = FALSE
)

Arguments

GRN

Object of class GRN

outputFolder

Character or NULL. Default NULL. If set to NULL, the default output folder as specified when initiating the object in link{initializeGRN} will be used. Otherwise, all output from this function will be put into the specified folder. We recommend specifying an absolute path.

basenameOutput

NULL or character. Default NULL. Basename of the output files that are produced. If set to NULL, a default basename is chosen. If a custom basename is specified, all output files will have the chosen basename as file prefix, be careful with not overwriting already existing files (if forceRerun is set to TRUE)

plotAsPDF

TRUE or FALSE. Default TRUE.Should the plots be printed to a PDF file? If set to TRUE, a PDF file is generated, the name of which depends on the value of basenameOutput. If set to FALSE, all plots are printed to the currently active device. Note that most functions print more than one plot, which means you may only see the last plot depending on your active graphics device.

pdf_width

Number. Default 12. Width of the PDF, in cm.

pdf_height

Number. Default 12. Height of the PDF, in cm.

title

NULL or Character. Default NULL. Title to be assigned to the plot.

maxRowsToPlot

Numeric. Default 500. Refers to the maximum number of connections to be plotted.

graph

Character. Default TF-gene. One of: TF-gene, TF-peak-gene. Whether to plot a graph with links from TFs to peaks to gene, or the graph with the inferred TF to gene connections.

colorby

Character. Default type. One of type, code community. Color the vertices by either type (TF/peak/gene) or community. See calculateCommunitiesStats

layered

Boolean. Default FALSE. Display the network in a layered format where each layer corresponds to a node type (TF/peak/gene).

vertice_color_TFs

Named list. Default list(h = 10, c = 85, l = c(25, 95)). The list must specify the color in hcl format (hue, chroma, luminence). See the colorspace package for more details and examples

vertice_color_peaks

Named list. Default list(h = 135, c = 45, l = c(35, 95)).

vertice_color_genes

Named list. Default list(h = 260, c = 80, l = c(30, 90)).

vertexLabel_cex

Numeric. Default 0.4. Font size (multiplication factor, device-dependent)

vertexLabel_dist

Numeric. Default 0 vertex. Distance between the label and the vertex.

forceRerun

TRUE or FALSE. Default FALSE. Force execution, even if the GRN object already contains the result. Overwrites the old results.

Value

the GRN object

Examples

GRN = loadExampleObject()
GRN = visualizeGRN(GRN, maxRowsToPlot = 700, graph = "TF-gene", colorby = "type")

chrarnold/GRaNIE documentation built on April 28, 2022, 2:18 a.m.