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

from_ms: assign samples to populations #32

Open
grahamgower opened this issue Jul 15, 2021 · 6 comments
Open

from_ms: assign samples to populations #32

grahamgower opened this issue Jul 15, 2021 · 6 comments

Comments

@grahamgower
Copy link
Member

Currently all samples are assigned to a single population. But the ms command line is included in the ms output, so the sampling configuration could be parsed. This could be used to assign the samples to the correct populations.

@jeromekelleher
Copy link
Member

I guess we could use demes to parse the ms command line?

@grahamgower
Copy link
Member Author

We only need to parse one option (-I npop n1 n2 n3 ... [4Nm]). If it's present, use it, otherwise there's only one population. I think pulling in demes here would be overkill.

@grahamgower
Copy link
Member Author

grahamgower commented Jul 15, 2021

Hmm, actually, this could be more complicated if the user did temporal sampling with -eA. Probably easiest to just detect that and throw an error.

@jeromekelleher
Copy link
Member

OK - given the fundamental limitation on what we can read in from ms with the branch lengths though, I'm pretty lukewarm on putting effort into this.

@grahamgower
Copy link
Member Author

grahamgower commented Jul 15, 2021

Sure. My specific use case would be better served by adding an option to mspms to output a tree sequence anyhow. :)

@jeromekelleher
Copy link
Member

Hah, yes, good point. It's quite a roundabout way of getting a tree sequence out of msprime!

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

2 participants