simulate_generator | R Documentation |
Simulate the DTMC associated to the generator to create a dataset that reflects the genotypes of 'times' cells, sampled after 'time_ticks' passages.
simulate_generator( generator, time_ticks, times, starting_label = "Clonal", by = "labels", mode = "full" )
generator |
a generator |
time_ticks |
number of steps (updates) of the DTMC associated to the generato |
times |
number of sumlated cells |
starting_label |
node from which to start the simulation |
by |
"labels" or "samples" to use gene labels or sample labels as references to identify the ‘starting_label'’s node |
mode |
"full" to generate a matrix with 'times' genotypes, "compacted" to *efficiently* create an already compacted dataset (a dataset showing the genotypes and their respective frequencies) |
the simulated dataset
require(dplyr) example_dataset() %>% make_generator_stub() %>% set_generator_edges( list( "D", "A, D", 1 , "A", "A, D", 1 , "A, D", "A, C, D", 1 , "A, D", "A, B, D", 1 , "Clonal", "D", 1 , "Clonal", "A", 1 , "D", "D", 1 , "A", "A", 1 , "A, D", "A, D", 1 , "A, C, D", "A, C, D", 1 , "A, B, D", "A, B, D", 1 , "Clonal", "Clonal", 1 )) %>% finalize_generator %>% simulate_generator(3, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.