simulate_count_scDesign2: Simulate a count matrix for experimental design

View source: R/data_simulation.R

simulate_count_scDesign2R Documentation

Simulate a count matrix for experimental design

Description

Simulate a count matrix for experimental design

Usage

simulate_count_scDesign2(
  model_params,
  n_cell_new,
  cell_type_prop = 1,
  total_count_new = NULL,
  total_count_old = NULL,
  n_cell_old = NULL,
  sim_method = c("copula", "ind"),
  reseq_method = c("mean_scale", "multinomial"),
  cell_sample = FALSE
)

Arguments

model_params

A list with the same length as cell_type_prop that contains the fitted model as each of its element (can be either the copula model or the (w/o copula) model).

n_cell_new

The total number of cells in the simulated count matrix.

cell_type_prop

The cell type proportion in the simulated count matrix.

total_count_new

The (expected) total number of reads or UMIs in the simulated count matrix.

total_count_old

The total number of reads or UMIs in the original count matrix where model_params was fitted.

n_cell_old

The The total number of cells in the original count matrix where model_params was fitted.

sim_method

Specification of the type of model for data simulation. Default value is 'copula', which selects the copula model. 'ind' will select the (w/o copula) model.

reseq_method

Specification of how the new count matrix should be derived under the new sequencing depth. Default is 'mean_scale', which scales the original parameters and then simulate new data. 'multinomial' will do a resampling. It ensures that the simulated count matrix has the exact total number of reads as specified in total_count_new.

cell_sample

Logical, whether cells for each cell type should be sampled from a multinomial distribution or follows the exact same proportion as specified in cell_type_prop.

Value

A matrix of shape p by n that contains the simulated count values. p is derived from model_params.


JSB-UCLA/scDesign2 documentation built on Nov. 2, 2024, 4:26 a.m.