gen_rnaseq {SeqNet} | R Documentation |
Generate RNA-seq data from an underlying network
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
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 |
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.
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
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.