msprime icon indicating copy to clipboard operation
msprime copied to clipboard

more than 100 populations in one event

Open lea-guyon opened this issue 2 years ago • 3 comments

I'm using SLiM to simulate populations undergoing a lot of fission events, and I would like to use the function recapitate in pyslim to obtain fully coalesced tree sequences, but I get the following error message : "Cannot have more than 100 populations in one event." Do you have any ideas how to deal with this ?

Would it be a solution to remove the population information in the metadata of the tree sequence ? I need to recapitate trees with a maximum of two roots, and since my simulations start with a single population, I don't really understand why having too many populations at some point can be an issue.

Thanks for your help !

lea-guyon avatar Jun 10 '22 12:06 lea-guyon

This is a duplicate of #1541

I think this is an arbitrary limit I put in to make the memory management of the population split events easier. There's no deep reason for it, but it would be some work to make it work for arbitrary numbers of populations.

The simplest thing is to use MassMigration events to have the same effect, i.e., instead of one population split event involving P1, P2, ... Pn going to ancestral population A, have n MassMigration events that migrate the lineages from P1 -> A, P2 -> A, etc.

Does this help?

jeromekelleher avatar Jun 10 '22 12:06 jeromekelleher

Thank you for the quick answer ! (and sorry for the duplicate) I'm going to try this solution

lea-guyon avatar Jun 10 '22 12:06 lea-guyon

If this works for you then we should probably add a note about this to the documentation so that other people will hopefully be able to Google for the error message and find the answer.

jeromekelleher avatar Jun 10 '22 12:06 jeromekelleher