Skip to content

Commit 32ae37f

Browse files
committed
Fix Tree and TreeSequence docstrings
1 parent 83ff801 commit 32ae37f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

python/tskit/trees.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ class Migration(util.Dataclass):
575575
"""
576576
id: int # noqa A003
577577
"""
578-
The integer ID of this mutation. Varies from 0 to
579-
:attr:`TreeSequence.num_mutations` - 1.
578+
The integer ID of this migration. Varies from 0 to
579+
:attr:`TreeSequence.num_migrations` - 1.
580580
"""
581581

582582

@@ -774,7 +774,7 @@ def root_threshold(self):
774774
calling the :meth:`TreeSequence.trees` iterator.
775775
776776
:return: The root threshold.
777-
:rtype: :class:`TreeSequence`
777+
:rtype: int
778778
"""
779779
return self._ll_tree.get_root_threshold()
780780

@@ -885,7 +885,8 @@ def seek(self, position, skip=None):
885885
886886
:param float position: The position along the sequence length to
887887
seek to.
888-
:raises ValueError: If 0 < position or position >=
888+
:raises ValueError: If ``position`` is less than 0 or ``position`` is greater
889+
than or equal to
889890
:attr:`TreeSequence.sequence_length`.
890891
"""
891892
if position < 0 or position >= self.tree_sequence.sequence_length:
@@ -922,7 +923,7 @@ def unrank(num_leaves, rank, *, span=1, branch_length=1) -> Tree:
922923
the interval :math:`[0, \\text{span})` and the :attr:`~Tree.tree_sequence`
923924
from which the tree is taken will have its
924925
:attr:`~tskit.TreeSequence.sequence_length` equal to ``span``.
925-
:param: float branch_length: The minimum length of a branch in this tree.
926+
:param float branch_length: The minimum length of a branch in this tree.
926927
:raises ValueError: If the given rank is out of bounds for trees
927928
with ``num_leaves`` leaves.
928929
"""
@@ -11004,12 +11005,12 @@ def map_to_vcf_model(
1100411005
return an integer numpy array the same dimension as the input. By default,
1100511006
this is set to ``numpy.round()`` which will round values to the nearest integer.
1100611007
11007-
If neither `name_metadata_key` nor `individual_names` is not specified, the
11008-
individual names are set to "tsk_{individual_id}" for each individual. If
11008+
If neither `name_metadata_key` nor `individual_names` is specified, the
11009+
individual names are set to ``"tsk_{individual_id}"`` for each individual. If
1100911010
no individuals are present, the individual names are set to "tsk_{i}" with
1101011011
`0 <= i < num_sample_nodes/ploidy`.
1101111012
11012-
A Warning are emmitted if any sample nodes do not have an individual ID.
11013+
A warning is emitted if any sample nodes do not have an individual ID.
1101311014
1101411015
:param list individuals: Specific individual IDs to include in the VCF. If not
1101511016
specified and the tree sequence contains individuals, all individuals are

0 commit comments

Comments
 (0)