Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/data-model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ respect to any other tables. Individuals can have a reference to their parent
individuals, if present these references must be valid or null (-1).

Individuals must be sorted such that parents are before children.
Sorting a set of tables using :meth:`TableCollection.sort` has
no effect on the individuals.
Sorting a set of tables using :meth:`TableCollection.sort` will ensure that
this requirement is fulfilled.


.. _sec_node_requirements:
Expand Down
5 changes: 4 additions & 1 deletion python/tskit/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2924,7 +2924,7 @@ def sort(self, edge_start=0):
are not affected. This parameter is provided to allow for efficient sorting
when the user knows that the edges up to a given index are already sorted.

The individual, node, population and provenance tables are not affected
The node, population and provenance tables are not affected
by this method.

Edges are sorted as follows:
Expand All @@ -2940,6 +2940,9 @@ def sort(self, edge_start=0):
given parent ID are adjacent, but we do not require that they be listed in
sorted order.

Individuals are sorted so that parents come before children, and the
parent column remapped as required.

Sites are sorted by position, and sites with the same position retain
their relative ordering.

Expand Down