gen_rnaseq: Generate RNA-seq data from an underlying network

Description Usage Arguments Value Examples

View source: R/gen_rnaseq.R

Description

The expression data are generated based on the gene-gene associations of an underlying network. An association structure is imposed by first generating data from a multivariate Gaussian distribution. Those data are then used to sample from the empirical distribution of gene expression profiles in the reference dataset using the inverse transform method.

Usage

1
gen_rnaseq(n, network, reference = NULL, verbose = TRUE)

Arguments

n

The number of samples to generate.

network

A 'network' object or list of 'network' objects.

reference

A data.frame containing reference gene expression data. Rows should correspond to samples and columns to genes. If NULL, then the kidney dataset is used.

verbose

Boolean indicator for message output.

Value

A list containing the simulated expression data and the reference dataset. If a list of networks were provided, then the results for each network are returned as a list.

Examples

1
2
3
4
nw <- random_network(10) # Create a random network with 10 nodes.
nw <- gen_partial_correlations(nw) # Add weights to connections in the network.
# If no reference is provided, the internal RNA-seq reference dataset is used.
x <- gen_rnaseq(20, nw)$x # Simulate 20 observations from the network.

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