run_simulation: Run data simulation

View source: R/run_simulation.R

run_simulationR Documentation

Run data simulation

Description

Simulation of complex scRNA-seq data based on the sampled underlying truth X

Usage

run_simulation(
  x,
  nc = 2000,
  ns = 3,
  nk,
  ng = nrow(x),
  de_perc,
  lfc = 2,
  c_c,
  gamma,
  beta,
  iter = 5
)

Arguments

x

a SingleCellExperiment.

nc

number of cells to simulate.

ns

number of samples to simulate.

nk

number of cell types to simulate.

ng

number of genes to simulate.

de_perc

percentage of cell types to be DE when initializing X0.

lfc

numeric value to use as mean logFC (logarithm base 2) for DE genes.

c_c

cell type relationship network matrix. 1 means connected, and 0 means not connected.

iter

number of iterations when sampling X.

\eqn{\gamma}, \eqn{\beta}

\Phi used for sampling the state matrix X.

Value

The estimated model parameters and the DE status

a SingleCellExperiment containing multiple clusters & samples across two groups as well as the following metadata:

cell metadata (colData(.))

a DataFrame containing, for each cell, it's cluster, sample, and group ID.

experiment metadata (metadata(.))
experiment_info

a data.frame summarizing the experimental design.

n_cells

the number of cells for each sample.

gene_info

a data.frame containing, for each gene in each cluster, it's differential distribution category, mean logFC (NA for genes for categories "ee"), gene used as reference (sim_gene), dispersion sim_disp, and simulation means for each group sim_mean.A/B.

ref_sids/kids

the sample/cluster IDs used as reference.

args

a list of the function call's input arguments.


biqing-zhu/MARBLES documentation built on Dec. 9, 2024, 5:33 p.m.