sccore (version 1.0.5)

getClusterGraph: Collapse vertices belonging to each cluster in a graph

Description

Collapse vertices belonging to each cluster in a graph

Usage

getClusterGraph(
  graph,
  groups,
  method = "sum",
  plot = FALSE,
  node.scale = 50,
  edge.scale = 50,
  edge.alpha = 0.3,
  seed = 1,
  ...
)

Value

collapsed graph

Arguments

graph

igraph graph object Graph to be collapsed

groups

factor on vertices describing cluster assignment (can specify integer vertex ids, or character vertex names which will be matched)

method

string Method to be used, either "sum" or "paga" (default="sum")

plot

boolean Whether to show collapsed graph plot (default=FALSE)

node.scale

numeric Scaling to control value of 'vertex.size' in plot.igraph() (default=50)

edge.scale

numeric Scaling to control value of 'edge.width' in plot.igraph() (default=50)

edge.alpha

numeric Scaling to control value of 'alpha.f' in adjustcolor() within plot.igraph() (default=0.3)

seed

numeric Set seed via set.seed() for plotting (default=1)

...

arguments passed to collapseGraphSum()

Examples

Run this code
# \donttest{
cluster.graph = getClusterGraph(conosGraph, igraph::V(conosGraph))
# }

Run the code above in your browser using DataLab