Skip to contents

Draws undirected skeletons with igraph: Erdős–Rényi (erdos_renyi), hub / star modules (hub), Barabási–Albert preferential attachment (scale_free), a stochastic block model (stochastic_block_model), or Watts–Strogatz small-world (small_world) (Barabási and Albert 1999) .

Usage

generate_random_network_skeleton(n_genes, graph_model, graph_params = list())

Arguments

n_genes

Integer \(G\), number of nodes (genes).

graph_model

One of "erdos_renyi", "hub", "scale_free", "stochastic_block_model", "small_world".

graph_params

Named list of generator parameters:

erdos_renyi

p edge probability for igraph::sample_gnp() (default targets average degree about 2)

hub

n_hubs: partition nodes into that many groups and connect each group's hub to all other members (star modules)

scale_free

power, edges_per_node (m in igraph::sample_pa())

stochastic_block_model

block_prob, p_within, p_between

small_world

nei, p (rewiring probability) for igraph::sample_smallworld()

Value

Symmetric integer matrix \(G\times G\) with zero diagonal.