Skip to content

Mutation time - backwards compatibility #692

@benjeffery

Description

@benjeffery

As it stands when #672 is merged we break compatibility in the following ways:

  1. File format (not too bad as Mutation time #672 has a tskit upgrade cli support)
  2. python MutationTable.add_row every call to this function will need updating.
  3. python MutationTable.[set|append]_columns every call to these functions will need updating.
  4. cpython LightweightTableCollection.from_dict will fail when passed dicts made in, for example, msprime 0.7.4 or newer.
  5. C API extra time args to mutation table methods (no way around this)

2 and 3 could be avoided by allowing a default mutation-time of zero as on these methods. This would result in an invalid tree-sequence but TableCollection.tree_sequence could catch mutation time errors, call compute_mutation_times and build the tree sequence again, logging out a warning that mutation times were set.

4 Could be avoided in a similar way, by detecting the absence of mutation times in the dict and calling compute_mutation_times again.

Note that currently compute_mutation_times spreads mutations evenly across edges (except for those above a root node where the mutation is placed at the same time as the root)

In summary we could make this release more or less backward compatible (python-wise). My concern is that users should be aware that they have placeholder mutation times, as otherwise they could end up using them in some analysis as if they were "proper".

Tagging some people who may have input here: @jeromekelleher @petrelharp @hyanwong @molpopgen @bhaller

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions