File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ --------------------
2+ [1.2.0] - 2025-XX-XX
3+ --------------------
4+
5+ **Breaking changes **
6+
7+ - ``tsk_treeseq_init `` now requires that mutation parents in the table collection
8+ are correct and consistent with the topology of the tree at the mutation site.
9+ Returns ``TSK_ERR_BAD_MUTATION_PARENT `` if this is not the case, or
10+ ``TSK_ERR_MUTATION_PARENT_AFTER_CHILD `` if the mutations are not in an order
11+ compatible with the correct mutation parent.
12+ (:user: `benjeffery `, :issue: `2729 `, :issue: `2732 `, :pr: `3212 `).
13+
14+ **Features **
15+
16+ - Add ``TSK_TS_INIT_COMPUTE_MUTATION_PARENTS `` to ``tsk_treeseq_init ``
17+ to compute mutation parents from the tree sequence topology.
18+ Note that the mutations must be in the correct order.
19+ (:user: `benjeffery `, :issue: `2757 `, :pr: `3212 `).
20+
21+ - Add ``TSK_CHECK_MUTATION_PARENTS `` option to ``tsk_table_collection_check_integrity ``
22+ to check that mutation parents are consistent with the tree sequence topology.
23+ This option implies ``TSK_CHECK_TREES ``.
24+ (:user: `benjeffery `, :issue: `2729 `, :issue: `2732 `, :pr: `3212 `).
25+
26+ - Add the ``TSK_NO_CHECK_INTEGRITY `` option to ``tsk_table_collection_compute_mutation_parents ``
27+ to skip the integrity checks that are normally run when computing mutation parents.
28+ This is useful for speeding up the computation of mutation parents when the
29+ tree sequence is certainly known to be valid.
30+ (:user: `benjeffery `, :pr: `3212 `).
31+
32+
133--------------------
234[1.1.4] - 2025-03-31
335--------------------
Original file line number Diff line number Diff line change @@ -507,13 +507,14 @@ requirements for a valid set of mutations are:
507507 ` time ` and equal to or less than the ` time ` of the ` parent ` mutation
508508 if this mutation has one. If one mutation on a site has ` UNKNOWN_TIME ` then
509509 all mutations at that site must, as a mixture of known and unknown is not valid.
510- - ` parent ` must either be the null ID (-1) or a valid mutation ID within the
511- current table
510+ - ` parent ` must either be the null ID (-1), if the mutation has no parent, or a
511+ valid mutation ID within the current table.
512512
513513Furthermore,
514514
515- - If another mutation occurs on the tree above the mutation in
516- question, its ID must be listed as the ` parent ` .
515+ - The ` parent ` value must be consistent with the topology of the tree at the site
516+ of the mutation, such that a path from the child mutation to the parent mutation
517+ exists without passing through any other mutations at the same site.
517518
518519For simplicity and algorithmic efficiency, mutations must also:
519520
Original file line number Diff line number Diff line change @@ -3682,8 +3682,8 @@ def compute_mutation_parents(self):
36823682 valid, and the site and mutation tables must be sorted (see
36833683 :meth:`TableCollection.sort`). This will produce an error if mutations
36843684 are not sorted (i.e., if a mutation appears before its mutation parent)
3685- *unless* the two mutations occur on the same branch, in which case
3686- there is no way to detect the error.
3685+ *unless* the two mutations occur on the same branch, and have unknown times
3686+ in which case there is no way to detect the error.
36873687
36883688 The ``parent`` of a given mutation is the ID of the next mutation
36893689 encountered traversing the tree upwards from that mutation, or
You can’t perform that action at this time.
0 commit comments