SimulateTrueCounts: Generate both evf and gene effect and simulate true...

View source: R/simulation_functions.R

SimulateTrueCountsR Documentation

Generate both evf and gene effect and simulate true transcript counts

Description

Generate both evf and gene effect and simulate true transcript counts

Usage

SimulateTrueCounts(
  ncells_total,
  min_popsize,
  i_minpop = 1,
  ngenes,
  evf_center = 1,
  evf_type = "one.population",
  nevf = 10,
  phyla,
  randseed,
  n_de_evf = 0,
  vary = "s",
  Sigma = 0.4,
  geffect_mean = 0,
  gene_effects_sd = 1,
  gene_effect_prob = 0.3,
  bimod = 0,
  param_realdata = "zeisel.imputed",
  scale_s = 1,
  impulse = F,
  gene_module_prop = 0,
  prop_hge = 0.015,
  mean_hge = 5
)

Arguments

ncells_total

number of cells

min_popsize

the number of cells in the smallest population

i_minpop

specifies which population has the smallest size

ngenes

number of genes

evf_center

the value which evf mean is generated from

evf_type

string that is one of the following: 'one.population','discrete','continuous'

nevf

number of evfs

phyla

the cell developmental tree if chosing 'discrete' or 'continuous' evf type. Can either be generated randomly (using pbtree(nclusters) function from phytools package) or read from newick format file using the ape package

randseed

random seed

n_de_evf

number of differential evfs between populations

vary

which kinetic parameters should the differential evfs affect. Default is 's'. Can be "kon", "koff", "s", "all", "except_kon", "except_koff", "except_s". Suggestions are "all" or "s".

Sigma

parameter of the std of evf values within the same population

geffect_mean

the mean of the normal distribution where the non-zero gene effect sizes are sampled from

gene_effect_prob

the probability that the effect size is not 0

bimod

the amount of increased bimodality in the transcript distribution, 0 being not changed from the results calculated using evf and gene effects, and 1 being all genes are bimodal

param_realdata

pick from zeisel.imputed or NULL; zeisel.imputed means using the distribution of kinetic parameters learned from the Zeisel 2015 dataset. This option is recommended.

scale_s

a factor to scale the s parameter, which is used to tune the size of the actual cell (small cells have less number of transcripts in total)

impulse

use the impulse function when generating continuous population or not. Default is F.

gene_module_prop

proportion of genes which are in co-expressed gene module

prop_hge

the proportion of very highly expressed genes

mean_hge

the parameter to amplify the gene-expression levels of the very highly expressed genes

gene_effect_sd

the standard deviation of the normal distribution where the non-zero gene effect sizes are sampled from

Value

a list of 4 elements, the first element is true counts, second is the gene level meta information, the third is cell level meta information, including a matrix of evf and a vector of cell identity, and the fourth is the parameters kon, koff and s used to simulation the true counts


YosefLab/SymSim documentation built on Sept. 30, 2024, 2:22 p.m.