View source: R/deg_simulation.R
make_DEG_pattern | R Documentation |
Generate complicated differentially expressed gene (DEG) pattern to simulate varied degree of heterogeneity.
make_DEG_pattern( n.genes, n.samples, fold.change = 2, gene.rate = 0.3, sample.rate = 1, active.rate = 1, up.rate = 0.5 )
n.genes |
The total number of genes in the simulated data. |
n.samples |
The total number of samples in the simulated data. |
fold.change |
The fold change level of DEGs. |
gene.rate |
The proportion of DEGs to all genes. |
sample.rate |
The proportion of abnormal samples to all samples. |
active.rate |
The probability that a DEG is truely differentially expressed in an abnormal sample. |
up.rate |
The proportion of up-regulated DEGs to all DEGs. |
The heterogeneity of gene expression pattern is mainly controlled by
two parameters: sample.rate
and active.rate
. If both
parameters are equal to 1, the gene expression pattern will be homogeneous,
otherwise heterogeneous.
This function will return a list with the following components:
FC |
The matrix of simulated fold changes. Each row represents a gene and each column represents a sample. |
gene |
The vector of gene status: 1 for up-regulated, -1 for down-regulated, and 0 for normal genes. |
sample |
The vector of sample status: 1 for abnormal, and 0 for normal samples. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.