Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some symmetric migration scenarioes are not simplified #384

Closed
apragsdale opened this issue Nov 28, 2021 · 0 comments · Fixed by #385
Closed

Some symmetric migration scenarioes are not simplified #384

apragsdale opened this issue Nov 28, 2021 · 0 comments · Fixed by #385
Assignees

Comments

@apragsdale
Copy link
Member

For graphs with continuous symmetric migration between two demes that do not have equivalent time intervals of existence, graph.asdict_simplified() does not collapse the directional migrations into a single symmetric migration specified by demes and rate. Instead, it remains as asymmetric migrations with source and dest. Those migrations should be collapsed.

For example, using the Gutenkunst-OOA model:

import demes
g = demes.load("examples/gutenkunst_ooa.yml")
print(g)

The migrations print as

migrations:
- demes: [YRI, CEU]
  rate: 3e-05
- demes: [YRI, CHB]
  rate: 1.9e-05
- demes: [CEU, CHB]
  rate: 9.6e-05
- {source: YRI, dest: OOA, rate: 0.00025}
- {source: OOA, dest: YRI, end_time: 21200.0, rate: 0.00025}

The input file has

tail -n 5 examples/gutenkunst_ooa.yaml
migrations:
- {demes: [YRI, OOA], rate: 25e-5}
- {demes: [YRI, CEU], rate: 3e-5}
- {demes: [YRI, CHB], rate: 1.9e-5}
- {demes: [CEU, CHB], rate: 9.6e-5}
@apragsdale apragsdale self-assigned this Nov 28, 2021
apragsdale added a commit to apragsdale/demes that referenced this issue Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant