popsim-consortium / demes-python

Tools for describing and manipulating demographic models.
https://popsim-consortium.github.io/demes-docs/
ISC License
18 stars 6 forks source link

Create Demes--> MaCS translator #487

Open gregorgorjanc opened 1 year ago

gregorgorjanc commented 1 year ago

MaCS is quite performant in several cases (see https://github.com/tskit-dev/msprime/issues/1651) so having Demes --> MaCS translator would be handy to have. Possibly even MaCS --> Demes (@grahamgower tells me at https://github.com/RacimoLab/demes-r/issues/3#issuecomment-1323573188 that this is pretty complicated though).

All this might be fairly straightforward though because MaCS accepts all? ms arguments!

I would be ok working on this ...

grahamgower commented 1 year ago

The ms converter functionality could definitely be reused here, so the effort involved should be quite small. I seem to recall that there were some (small) discrepancies between MaCS cli args and ms args, which we would need to handle carefully. So I think the first steps would be to identify:

grahamgower commented 1 year ago

The proportion of lineages moved via the -es option is different to ms. https://github.com/gchen98/macs/issues/34

grahamgower commented 1 year ago

Another check worth doing would be to run the following script, setting the MS variable to the path of the macs binary, which checks the interpretation of migration indices. https://github.com/popsim-consortium/demes-python/blob/main/tests/ms_asymmetric_migration.sh