plot_graph: plot_graph

Description Usage Arguments Details Value Examples

View source: R/generics.R

Description

Plot the geneset kNN network as a graph.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## S3 method for class 'BOWER'
plot_graph(
  bower,
  colorby = "cluster",
  mode = c("default", "gsea"),
  gsea.slot = c("padj", "pval", "NES", "ES"),
  gsea.pval.cutoff = 0.25,
  node.size = "geneset_size",
  node.label = "labels",
  node.label.size = 3,
  title = NULL,
  title.size = 3,
  edge.width = "weight",
  edge.width.thickness.range = c(0, 1),
  edge.alpha = 0.25,
  dot_max = 8,
  guides.colour = FALSE
)

## S3 method for class 'igraph'
plot_graph(
  gr,
  colorby = "cluster",
  node.size = "geneset_size",
  node.label = "labels",
  node.label.size = 3,
  title = NULL,
  title.size = 3,
  edge.width = "weight",
  edge.width.thickness.range = c(0, 1),
  edge.alpha = 0.25,
  dot_max = 8,
  guides.colour = FALSE,
  ...
)

Arguments

bower

BOWER object

colorby

name of attribute for colors of nodes.

node.size

name of attribute for size of nodes or numerical value/vector.

node.label

name of attribute for colors of nodes.

node.label.size

size of node label.

edge.width

name of attribute for width of edges.

edge.width.thickness.range

scale for range of widths of edges.

edge.alpha

transparency of edges.

guides.colour

boolean. whether or not to display guide for vertex colour.

...

passed to ggraph::ggraph

node.max_size

maximum node size.

Details

Just a ggraph wrapper to plot the graph.

Value

Returns a ggraph plot.

Examples

1
2
3
4
5
6
gmt_file <- system.file("extdata", "h.all.v7.4.symbols.gmt", package = "bowerbird")
bwr <- bower(gmt_file)
bwr <- snn_graph(bwr)
bwr <- find_clusters(bwr)
bwr <- summarize_clusters(bwr, ncpus = 1)
plot_graph(bwr)

clatworthylab/bowerbird documentation built on Dec. 19, 2021, 5:15 p.m.