Internal function for generating synthetic single-cell data through simulation of tumor growth and evolution.
.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
)
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.
Number of samples
Number of sites
Number of non-root nodes in the evolutionary tree to be generated.
The rate of mutation on each evolutionary step in evolutionary tree synthesis.
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
.
The amount of increasing or decreasing the advantage of a cell relative to its parent.
Rate of missing value to be added to the resulting sequences.
Rate of false positive (0 -> 1) and false negative (1 -> 0) in the sequences.
The seed for randomization.