@@ -1778,8 +1778,11 @@ def add_site(
1778
1778
that the input array is also of this type.
1779
1779
:param list(str) alleles: A list of strings defining the alleles at this
1780
1780
site. Only biallelic sites can currently be used for inference. Sites
1781
- with 3 or more alleles cannot have ``inference`` (below) set to ``True``.
1782
- If not specified or None, defaults to ["0", "1"].
1781
+ with 3 or more non-missing alleles cannot have ``inference`` (below)
1782
+ set to ``True``. If missing data is present in the ``genotypes`` array,
1783
+ the stored list of alleles will be modified as necessary so that
1784
+ ``alleles[tskit.MISSING_DATA] == None``. If ``alleles`` is not specified
1785
+ or None, a default of ["0", "1"] is used.
1783
1786
:param dict metadata: A JSON encodable dict-like object containing
1784
1787
metadata that is to be associated with this site.
1785
1788
:param float time: The time of occurence (pastwards) of the mutation to the
@@ -2073,6 +2076,9 @@ def variants(self, sites=None, recode_ancestral=None):
2073
2076
state will have a genotype of 0. If the ancestral state is unknown, the
2074
2077
original input order is kept.
2075
2078
2079
+ If a variant contains missing data, it is guaranteed that the alleles
2080
+ attribute for that variant satisfies ``alleles[tskit.MISSING_DATA] == None``.
2081
+
2076
2082
:param array sites: A numpy array of ascending site ids for which to return
2077
2083
data. If None (default) return all sites.
2078
2084
:param bool recode_ancestral: If True, recode genotypes at sites where the
0 commit comments