Stdpopsim: Add population metadata

Created on 8 Jun 2019  路  14Comments  路  Source: popsim-consortium/stdpopsim

Tskit allows arbitrary metadata to be assocated with populations. Msprime 0.7.1 just added the facility to use metdata with PopulationConfiguration objects, so we now can add some descriptive stucture to each population. This should really help with debugging.

I suggest we add something simple like, e.g.

metadata={
    "name": "AFR", 
    "description": "The contemporary African population"
}

Any thoughts @ndukler, @andrewkern?

Most helpful comment

The default plots might get messed up, but I can fix them if so. This will avoid other confusion.

All 14 comments

I like this. My only thought is that the interpretation of the population changes over time (e.g. European -> OOA) but I see no downside to doing this. Do you want me to go back through the models and add metadata to the PopulationConfiguration objects? It also means we'll have to enforce the version number of the msprime package strictly; do we want to do that?

I like this. My only thought is that the interpretation of the population changes over time (e.g. European -> OOA) but I see no downside to doing this.

Good point. Maybe it would be better if we created different populations for things like the ancient OOA? The overhead in msprime is minimal, and I guess is just needs an extra MassMigration to implement. What do you think?

Do you want me to go back through the models and add metadata to the PopulationConfiguration objects?

That would be amazing - you are a legend!

It also means we'll have to enforce the version number of the msprime package strictly; do we want to do that?

I think that's fine. We just put in msprime >=0.7.1 in setup.py and it'll be taken care of.

this functionality sounds great @jeromekelleher. creating different populations associated with metadata sounds just about ideal, but if we did that I fear we would break the DemographyDebugger.coalescence_rate_trajectory() function...

what do you think @jgallowa07 @petrelharp?

this functionality sounds great @jeromekelleher. creating different populations associated with metadata sounds just about ideal, but if we did that I fear we would break the DemographyDebugger.coalescence_rate_trajectory() function...

I don't see how it would break the functionality of DemographyDebugger.coalescence_rate_trajectory() ... but maybe I'm missing something here. The metadata is just helpful information, it shouldn't effect (or _create_) population demography, yea?

worried about creating different populations linked by mass migration-- still ok?

The mass migration case was taken care of (checkout https://github.com/tskit-dev/msprime/blob/21783d1522e8b8ebfe16f1333cf397f64c3b1954/msprime/simulations.py#L1639), does the metadata mess with this @andrewkern?

The default plots might get messed up, but I can fix them if so. This will avoid other confusion.

I think this all sounds good. I can make the necessary alterations to the QC models, but someone else should make the alterations to the production models so that we maintain our QC process. Otherwise I might just make the mistake in both.

@jeromekelleher msprime 0.7.1 does not appear to be on conda-forge. I only see up to 0.7.0.

Sorry about this @ndukler, I'm having trouble with the conda-forge builds. The windows builds are currently broken - see here.

Released on conda-forge now @ndukler, all should be good.

Thanks!

Done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeromekelleher picture jeromekelleher  路  5Comments

grahamgower picture grahamgower  路  4Comments

andrewkern picture andrewkern  路  8Comments

gtsambos picture gtsambos  路  4Comments

David-Peede picture David-Peede  路  6Comments