plotGANetwork {scapGNN}R Documentation

Visualize gene association network graph of a gene module or pathway at the specified cell phenotype

Description

Based on the gene set input by the user, plotGANetwork functional draws the gene association network in the specified cell phenotype. The node size in the network reflects the activation strength of the gene. The thickness of the edge indicates the strength of interaction between genes.

Usage

plotGANetwork(
  network.data,
  cellset,
  geneset,
  rwr.gamma = 0.7,
  vertex.colors = NULL,
  vertex.size = 10,
  vertex.label.cex = 0.8,
  vertex.label.dist = 1,
  vertex.label.color = "black",
  edge.width = 5,
  margin = 0,
  layout = layout_as_star,
  main = NULL,
  plotgraph = TRUE
)

Arguments

network.data

Network data constructed by the ConNetGNN function.

cellset

A vector of cell id. A cell set corresponding to the specified cell phenotype.

geneset

A vector of gene id. A gene module or pathway.

rwr.gamma

Restart parameter. Default: 0.7.

vertex.colors

The fill color of the vertex. The number of colors should match the number of cell phenotypes. If NULL (default), the system will automatically assign colors.

vertex.size

The size of the vertex. Default: 10.

vertex.label.cex

The font size for vertex labels. Default: 0.8.

vertex.label.dist

The distance of the label from the center of the vertex. If it is 0 then the label is centered on the vertex. Default: 1.

vertex.label.color

The color of the labels. Default: black.

edge.width

The width of the edge. This does not affect the relative size of the edge weights. Default: 5.

margin

The amount of empty space below, over, at the left and right of the plot, it is a numeric vector of length four. Usually values between 0 and 0.5 are meaningful, but negative values are also possible, that will make the plot zoom in to a part of the graph. If it is shorter than four then it is recycled. Default: 0.

layout

Either a function or a numeric matrix. It specifies how the vertices will be placed on the plot. For details, please refer to the igraphPackage. Default: layout_as_star.

main

A main title for the plot.

plotgraph

Whether to draw the picture. Default: TRUE. If FALSE, the image will not be displayed but the network data will be returned in the igraph data format.

Details

plotGANetwork

Value

A graph or list.

Examples

require(igraph)

# Load the result of the ConNetGNN function.
data(ConNetGNN_data)

data("Hv_exp")
index<-grep("0h",colnames(Hv_exp))
cellset<-colnames(Hv_exp)[index]
pathways<-load_path_data(system.file("extdata", "KEGG_human.gmt", package = "scapGNN"))
geneset<-pathways[[which(names(pathways)=="Tight junction [PATH:hsa04530]")]]
plotGANetwork(ConNetGNN_data,cellset,geneset,main = "Tight junction [PATH:hsa04530]")


[Package scapGNN version 0.1.4 Index]