simulateDataSetImpulseDE2: Simulate a data set for ImpulseDE2

View source: R/srcImpulseDE2_simulateDataSet.R

simulateDataSetImpulseDE2R Documentation

Simulate a data set for ImpulseDE2

Description

Simulates a data set with genes with constant and impulse expression traces. Expression strength and variation in impulse like traces are parameterised and random. All temporary files are saved into dirOutSimulation and only the objects necessary for running ImpulseDE2 (the count matrix and the annotation table are returned). The remaining objects representing hidden parameters can be used to evaluate parameter estimates.

Usage

simulateDataSetImpulseDE2(vecTimePointsA, vecTimePointsB, vecBatchesA,
  vecBatchesB, scaNConst, scaNImp, scaNLin, scaNSig, scaNRand = 0,
  scaSeedInit = 1, scaMumax = 1000, boolOneConstMu = FALSE,
  scaSDExpressionChange = 1, scaSDRand = NULL, scaMuSizeEffect = 1,
  scaSDSizeEffect = 0.1, scaMuBatchEffect = NULL,
  scaSDBatchEffect = NULL, dirOutSimulation = NULL)

Arguments

vecTimePointsA

(numeric vector number of time points) Number of time points in batch A.

vecTimePointsB

(numeric vector number of time points) Number of time points in batch B.

vecBatchesA

(str vector number of samples in vecTimePointsA) [Default NULL] Batch IDs of each sample in condition A. Set to NULL if simulating without batch effects.

vecBatchesB

(str vector number of samples in vecTimePointsB) [Default NULL] Batch IDs of each sample in condition B. Set to NULL if simulating without batch effects.

scaNConst

(scalar) Number of constant genes in data set.

scaNImp

(scalar) Number of impulse distributed genes in data set.

scaNLin

(scalar) Number of linear distributed genes in data set.

scaNSig

(scalar) Number of sigmoid distributed genes in data set.

scaNRand

(scalar) [Default NULL] Number of random distributed genes in data set.

scaSeedInit

(scalar) [Default 1] Scalar based on which seeds are chosen. One vlaue correspond sto a unique set of seeds for all random number generations.

scaMumax

(scalar) [Default 1000] Maximum expression mean parameter to be used.

boolOneConstMu

(bool) [Default False] Don't sample constant trajectories from uniform [0,scaMumax] but set all to scaMumax

scaSDExpressionChange

(scalar) [Default 1] Standard deviation of normal distribution from which the amplitude change within an impulse trace is drawn.

scaSDRand

(scalar) [Default 0] Standard deviation of normal distribution from which the random deviations are drawn.

scaMuSizeEffect

(numeric vector number of genes) [Default NULL] Mean of normal distribution of which scaNLing factor for size effects per sample are drawn.

scaSDSizeEffect

(numeric vector number of genes) [Default NULL] Standard deviation of normal distribution of which scaling factor for size effects per sample are drawn.

scaMuBatchEffect

(numeric vector number of genes) [Default NULL] Mean of normal distribution of which scaling factor for batch effects per gene are drawn (reference is batch A).

scaSDBatchEffect

(numeric vector number of genes) [Default NULL] Standard deviation of normal distribution of which scaling factor for batch effects per gene are drawn (reference is batch A).

dirOutSimulation

(directory) [Default NULL] Directory to which simulated parameter objects are saved to.

Value

list (length 2)

  • dfAnnotation (data frame samples x covariates) Sample, Condition, Time (numeric), TimeCateg (str) (and confounding variables if given). Annotation table with covariates for each sample.

  • matSampledCountsObserved (matrix genes x cells) Sampled count data of all cells after drop-out.

Author(s)

David Sebastian Fischer

See Also

Called by separately by user.

Examples

lsSimulatedData <- simulateDataSetImpulseDE2(
vecTimePointsA   = rep(seq(1,8),3),
vecTimePointsB   = NULL,
vecBatchesA      = NULL,
vecBatchesB      = NULL,
scaNConst        = 30,
scaNImp          = 10,
scaNLin          = 10,
scaNSig          = 10)


YosefLab/ImpulseDE2 documentation built on Sept. 17, 2022, 2:45 a.m.