-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add sim
top level function
#1540
Comments
I'm not sure what the gain is here - if there were more shared arguments it would make sense. To me it feels like you're hiding the key concept of mutations being placed after simulation of ancestry to just lose one line of code? |
Fair point. Just seems like a handy way of avoiding a bit of typing for common tasks, but maybe it would cause confusion. |
I'm in favor of this - it'd be nice for the casual/new user to not have to understand the point about mutations coming after ancestry. But as Ben says, it's just one line of code... |
I think forcing the user to understand this point is actually beneficial. The separation of sim_ancestry()/sim_mutations() makes it more explicit to users that the simulated tree(s) are necessarily independent of the mutations. Plus, the zen of Python says:
|
Well, two dissenting opinions is enough for me to not be motivated enough to do it for 1.0. Let's see how we go without it, and put it in later if it's something we miss having. |
Sure. We can add it later if others prefer. My main reason is that I often use msprime for generating a test tree sequence, e.g. But I can continue to use I think if you call it |
(@hyanwong - do you have links to the other threads where this has come up? I couldn't find them) |
I think it was almost entirely discussed on Slack. It's mentioned in passing at #1119 (comment) but I couldn't find other refs. |
I'm in the middle of doing something that illustrates a use-case for a top-level
You can see the repeat of random_seed is a bit annoying. But perhaps I should just use |
Interesting. I wouldn't see much point in actually setting seeds here, though. Running replicates via |
Yeah, thanks. It is a lot quicker using num_replicates. True about setting the seed, although it's nice to be able to make it replicable. |
I think there's probably less reason for this if we have #1786? |
It would be handy to have a top-level function that does simple simulations of ancestry and mutations. How about we do something like
We can add things like
ancestry_model
andmutation_model
etc as time goes by, but this much would satisfy 99% of the use cases I think (which is to do quick, simple simulations).If you want to do complex stuff like specify the
initial_state
etc, then you need to usesim_ancestry
directly.What do we think?
@hyanwong, you've been asking for this for a while - can you link to the issues involved please?
The text was updated successfully, but these errors were encountered: