-
Notifications
You must be signed in to change notification settings - Fork 78
Description
Currently we have no way of recording the precise age of a mutation. All that we know is that it occured somewhere on a branch. Most of the time this isn't an issue, but there are situtations in which we need to record this precise time (see, tskit-dev/msprime#946, e.g.).
We can add a MutationTable.time column easily enough. If the mutation time is not specified (the default) then we set it to the time of the mutation's node. If multiple mutations are added on the same branch without times being specified, then they will have the same time (oh well, no big deal I guess).
In terms of the file format, we make this optional in the same way that Edge metadata is optional (it would be simplest to call set_columns to implement this though). It might be best to do #506 first, therefore.
As this is backward compatible, we don't need to increment the file version number.
We will break some C code since mutation_table_add_row et al will need a new parameter, which most naturally comes between the current parent and derived_state. I guess providing TSK_NULL indicates you want the default for this. Since we're already breaking some C code, this seems fine.
@benjeffery, any thoughts here?