Learn R Programming

RScelestial (version 1.0.4)

.synthesis: Internal function for generating synthetic single-cell data through simulation of tumor growth and evolution.

Description

Internal function for generating synthetic single-cell data through simulation of tumor growth and evolution.

Usage

.synthesis(
  sample,
  site,
  evolutionSteps,
  mutationRate = 0.01,
  advantageIncreaseRatio = 1,
  advantageDecreaseRatio = 10,
  advantageKeepRatio = 100,
  advantageIncreaseStep = 0.01,
  advantageDecreaseStep = 0.01,
  mvRate = 0.5,
  fpRate = 0.2,
  fnRate = 0.1,
  seed = -1L
)

Value

The function returns a list. The list consists of

  • sequence: A data frame representing result of sequencing. The data frame has a row for each locus and a column for each sample.

  • true.sequence: The actual sequence for the sample before adding errors and missing values.

  • true.clone: A list that stores index of sampled cells for each node in the evolutionary tree.

  • true.tree: The evolutionary tree that the samples are sampled from. It is a data frame with src, dest, and len columns representing source, destination and weight of edges of the tree, respectively.

Arguments

sample

Number of samples

site

Number of sites

evolutionSteps

Number of non-root nodes in the evolutionary tree to be generated.

mutationRate

The rate of mutation on each evolutionary step in evolutionary tree synthesis.

advantageIncreaseRatio, advantageDecreaseRatio, advantageKeepRatio

A child node in the evolutionary tree is chosen for increase/decrease/keep its parent advantage with probabilities proportional to advantage.increase.ratio/advantage.decrease.ratio/advantage.keep.ratio.

advantageIncreaseStep, advantageDecreaseStep

The amount of increasing or decreasing the advantage of a cell relative to its parent.

mvRate

Rate of missing value to be added to the resulting sequences.

fpRate, fnRate

Rate of false positive (0 -> 1) and false negative (1 -> 0) in the sequences.

seed

The seed for randomization.