Skip to contents

Note that this essentially erases edge metrics and treats networks like binary graphs. Edge weights are not used in calculating network topology metrics.

Usage

rewire_network(
  e,
  network_name,
  channels = "cfos",
  method = "ms",
  ontology = "unified",
  n_rewires = 10000,
  n_networks = 100,
  return_graphs = FALSE,
  seed = 5
)

Arguments

e

experiment object

network_name

(str) Name of the network

channels

(str) Vector of channels to process

method

(str, default = "ms") "ms" implements Maslov-Sneppen rewiring approach (annuls all network properties except for network size, connection density, and degree distribution).

ontology

(str, default = "allen") Region ontology to use. options = "allen" or "unified"

n_rewires

(int, default = 10000) The number of rewires for randomization for "ms" rewiring implementation. Recommended to be the larger of either 10,000 or 10*No. edges in a graph.

n_networks

(int, default = 100) The number of random networks to create

return_graphs

(logical, default = FALSE) if TRUE, returns a list organized by channel containing a sublist, with each element containing a tidygraph object. This must be FALSE if you want to run you want to summarize the null network statistics with summarize_null_networks()

seed

(int, default = 5) Random seed for future replication.

Value

Summary table of rewired network properties of all nodes showing the average of all randomized network properties generated.