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

Define global stopping condition #2158

Open
jeromekelleher opened this issue Feb 21, 2023 · 0 comments
Open

Define global stopping condition #2158

jeromekelleher opened this issue Feb 21, 2023 · 0 comments
Milestone

Comments

@jeromekelleher
Copy link
Member

In #2157 we decided to add a boolean flag stop_at_local_mrca which states whether we should keep simulating the ancestry of genome segments after an mrca has been reached.

We also want some way of specifying the global stopping condition.

Note that we already have an end_time parameter, which currently allows us to stop simulations early, and could be used as the global stopping condition if we turn off the current default of stopping when all intervals have a local mrca.

I guess there's two options.

  1. We could have a stop_condition parameter which takes a string, and could have things like grand_mrca, all_local_mrcas, time (used in conjunction with end_time above)
  2. Have a single boolean parameter which turns off the current stop condition, like stop_at_all_local_mrcas or something?

Option (1) seems neater. We'd have something like

ts = msprime.sim_ancestry(10,
      stop_at_local_mrcas=False,
      stop_condition="time",
      end_time=100)

to record the full process back to time 100, regardless of whether coalescence occurs or not?

@jeromekelleher jeromekelleher added this to the 1.3.0 milestone Feb 21, 2023
@jeromekelleher jeromekelleher modified the milestones: 1.3.0, 1.3.1 Dec 6, 2023
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

No branches or pull requests

1 participant