Closed CecileTK closed 1 month ago
Dear Cécile,
You can for sure seed epidemics with multiple individuals, infected or not. To do this, simply change the initial values assigned to the population parameters. E.g.
<population id='I' spec='RealParameter' value='100'/>
should cause the "I" compartment to be initially seeded with 100 individuals.
What remaster can't do is generate trees with multiple roots. Thus while you can for sure simulate trajectories with this setup, if the sampled tree lineages fail to find a common ancestor before the start of the process remaster will produce an error, since the resulting ancestry can't be represented using a beast tree. (This is different to master, which allowed simulations to produce networks etc, but that proved to be in many ways much more trouble than it was worth.)
Hope this helps,
Tim
Thank you, that's helpful!
And just to confirm, does this mean that I can't generate a sequence alignment from such a simulation as this would require building the tree or is there a way to generate sequences simply from trajectories?
That's right - you need a tree to simulate a sequence alignment, thus the above approach wouldn't be sufficient.
If you did want to produce multiple trees from a single simulation, you could try to use the technique outlined here, defining multiple samplePopulation
, one for each starting individual, then define sampling unique sampling reactions for the descendants of each. Finally, you'd use PrunedTree
to log trees specific to each sample type. That would allow you to simulate distinct trees evolving in parallel within a single epidemic.
This approach might be a bit painful though, as the grammar wasn't designed with this use-case in mind. The subsequent sequence simulation also requires you answer difficult questions such as, "How are the individual starting sequences initiallized?"
Hello Tim!
Thanks again for the great simulation tool!
I've been using
remaster
andfeast
to generate sequence alignments from an SIR-like epidemic. I was wondering whether there was a way to seed the epidemics in multiple individuals. It looked like it was possible in MASTER and you mention it in remaster's documentation:Would there be a way to seed to epidemic with multiple lineages? Or as an alternative if that is not possible to seed the epidemic with the same lineage in multiple individuals?
Thank you! Cécile