get_sigma.network: Get the covariance matrix

Description Usage Arguments Value Examples

View source: R/networks.R

Description

The associations in each module are taken as partial correlations, and the covariance matrix is calculated from these assuming that expression for gene i is the weighted average over each module using 1/sqrt(m_i) as the weight, where m_i is the number of modules containing gene i.

Usage

1
2
## S3 method for class 'network'
get_sigma(x, ...)

Arguments

x

Either a 'network', 'network_module', or 'matrix' object.

...

Additional arguments.

Value

A covariance matrix.

Examples

1
2
3
4
5
6
7
# Create a random network with 10 nodes and add random edge weights.
nw <- random_network(10)
nw <- gen_partial_correlations(nw)
# Get covariance matrix for the network or individual modules in the network.
get_sigma(nw)
module <- nw$modules[[1]]
get_sigma(module)

tgrimes/SeqNet documentation built on Sept. 1, 2020, 7:50 a.m.