create_modules_for_network {SeqNet}R Documentation

Randomly sample subsets of genes for each module

Description

Creates a collection of modules containing randomly samples genes.

Usage

create_modules_for_network(
  n_modules,
  p,
  avg_module_size = 50,
  sd_module_size = 50,
  min_module_size = 10,
  max_module_size = 200,
  sample_link_nodes_fn = sample_link_nodes,
  sample_module_nodes_fn = sample_module_nodes,
  ...
)

Arguments

n_modules

The number of modules to include in the network.

p

The number of nodes in the network.

avg_module_size

The average number of nodes in a module.

sd_module_size

The standard deviation of module size.

min_module_size

The minimum number of nodes in a module.

max_module_size

A positive value. Any generated module sizes above this value will be reduced to 'max_module_size'. Set to 'Inf' to avoid this truncation.

sample_link_nodes_fn

A function used for sampling link nodes for a new module.

sample_module_nodes_fn

A function used for sampling nodes for a new module.

...

Additional arguments passed to random_module.

Value

A list containing the indices for genes contained in each module.

References

Grimes T, Datta S (2021). “SeqNet: An R Package for Generating Gene-Gene Networks and Simulating RNA-Seq Data.” Journal of Statistical Software, 98(12), 1–49. doi: 10.18637/jss.v098.i12, https://doi.org/10.18637/jss.v098.i12.

Examples

# Create a two modules (having random structures and sizes) from a pool 
# of 100 nodes.
create_modules_for_network(n_modules = 2, p = 100)
# Set n_modules = NULL to continue making modules until all nodes have
# been selected at least once.
create_modules_for_network(n_modules = NULL, p = 100)

[Package SeqNet version 1.1.3 Index]