Skip to content

Commit 3330365

Browse files
committed
Add a link to the subset docs from union
1 parent 81f4eb7 commit 3330365

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

docs/python-api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,12 @@ which perform the same actions but modify the {class}`TableCollection` in place.
262262
TreeSequence.simplify
263263
TreeSequence.subset
264264
TreeSequence.union
265+
TreeSequence.concatenate
265266
TreeSequence.keep_intervals
266267
TreeSequence.delete_intervals
267268
TreeSequence.delete_sites
268269
TreeSequence.trim
270+
TreeSequence.shift
269271
TreeSequence.split_edges
270272
TreeSequence.decapitate
271273
TreeSequence.extend_haplotypes
@@ -750,7 +752,9 @@ a functional way, returning a new tree sequence while leaving the original uncha
750752
TableCollection.keep_intervals
751753
TableCollection.delete_sites
752754
TableCollection.trim
755+
TableCollection.shift
753756
TableCollection.union
757+
TableCollection.concatenate
754758
TableCollection.delete_older
755759
```
756760

python/tskit/trees.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7068,6 +7068,10 @@ def shift(self, value, sequence_length=None, record_provenance=True):
70687068
``value``, unless ``sequence_length`` is given, in which case this will be used
70697069
for the new sequence length.
70707070
7071+
.. note::
7072+
By setting ``value=0``, this method will simply return a tree sequence
7073+
with a new sequence length.
7074+
70717075
:param value: The amount by which to shift the coordinate system.
70727076
:param sequence_length: The new sequence length of the tree sequence. If
70737077
``None`` (default) add ``value`` to the sequence length.
@@ -7366,9 +7370,9 @@ def union(
73667370
``other`` to nodes in ``self``.
73677371
:param bool check_shared_equality: If True, the shared portions of the
73687372
tree sequences will be checked for equality. It does so by
7369-
subsetting both ``self`` and ``other`` on the equivalent nodes
7370-
specified in ``node_mapping``, and then checking for equality of
7371-
the subsets.
7373+
running :meth:`TreeSequence.subset` on both ``self`` and ``other``
7374+
for the equivalent nodes specified in ``node_mapping``, and then
7375+
checking for equality of the subsets.
73727376
:param bool add_populations: If True, nodes new to ``self`` will be
73737377
assigned new population IDs.
73747378
:param bool record_provenance: Whether to record a provenance entry

0 commit comments

Comments
 (0)