splatter simulating paths
1
0
Entering edit mode
Last seen 3.5 years ago

I am trying to use splatter to simulate certain topologies - let's say I want to simulate a differentiation whose Newick tree would look like (B,(D,E)C)A; How do I implement this as a path for splatSimulate? It is not clear to me how to set up the path.from parameter.

splatter single cell • 555 views
2
Entering edit mode
Last seen 3.5 years ago

ok had to go into the code, but I think i figured it out:

when you define path.from, you specify at which points the branch starts. The end point of the branch you defined is always the position you are at:

path.from <- c(0, 1, 1, 2, 2)
|  |  |  |  |
1  2  3  4  5


this defines a tree that looks like this:

    ┌---3
0---1   ┌---4
└---2
└---5


would be great if the authors can confirm/deny :)

0
Entering edit mode
Hi @nikolaspapadop That is correct. I like your diagram, I might look at including that in the help page for the function.
0
Entering edit mode

thank you for the verification! Maybe it can save someone else some time :)