tskit-dev / msprime

Simulate genealogical trees and genomic sequence data using population genetic models
GNU General Public License v3.0
171 stars 84 forks source link

Add ``generation_time`` argument to sim_ancestry #1960

Open jeromekelleher opened 2 years ago

jeromekelleher commented 2 years ago

Originally discussed in PR #1953:

I think the solution to this (for the next msprime?) is to include a generation_time argument that scales all the times, and would make this warning go away. That would make the warning still accurate if it says "by default".

Originally posted by @petrelharp in https://github.com/tskit-dev/msprime/issues/1953#issuecomment-993616000

There's some nuance to this which we should discuss, though. Like, I guess we'd also have to provide the time units when providing this argument, since we'd definitely not want to the ts.time_units string to still be "generations" then.

We should pay close attention to what's been done in demes for this also.

jeromekelleher commented 2 years ago

Also, we should change the TimeUnitsMismatch warning to more accurately reflect the landscape when we do this (mention that this is the default and send them in the right direction for documentation on what all this means).

jeromekelleher commented 2 years ago

I've put this into 1.3 for now because I don't want to delay 1.2 (which is to get pedigrees done) over this. I don't think sorting this out fully is high on anyone's priority list?