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
10 changes: 5 additions & 5 deletions c/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
----------
Unreleased
----------
--------------------
[1.3.0] - 2025-11-27
--------------------

**Breaking changes**

Expand All @@ -12,13 +12,13 @@ Unreleased
**Features**

- ``tsk_variant_init`` and associated variant decoding methods now
fully support TSK_ISOLATED_NOT_MISSING not being set for internal nodes.
fully support ``TSK_ISOLATED_NOT_MISSING`` not being set for internal nodes.
(:user:`benjeffery`, :pr:`3313`)

- Add ``tsk_treeseq_decode_alignments`` to decode full-length reference-based
sequence alignments for specified nodes over a genomic interval, respecting
``TSK_ISOLATED_NOT_MISSING`` semantics.
(:user:`benjeffery` , :pr:`3324`, :issue:`3319`)
(:user:`benjeffery`, :pr:`3324`, :issue:`3319`)


--------------------
Expand Down
2 changes: 1 addition & 1 deletion c/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
2 changes: 1 addition & 1 deletion c/tskit/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ sizes and types of externally visible structs.
The library minor version. Incremented when non-breaking backward-compatible changes
to the API or ABI are introduced, i.e., the addition of a new function.
*/
#define TSK_VERSION_MINOR 2
#define TSK_VERSION_MINOR 3
/**
The library patch version. Incremented when any changes not relevant to the
to the API or ABI are introduced, i.e., internal refactors of bugfixes.
Expand Down
92 changes: 43 additions & 49 deletions python/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,74 +1,67 @@
----------
Unreleased
----------

**Features**

- ``TreeSequence.variants``, ``.genotype_matrix``, ``.haplotypes``, and ``.alignments`` methods
now fully support ``isolated_as_missing`` behaviour with internal nodes. ``.alignments`` is
also around 10% faster.
(:user:`benjeffery`, :pr:`3313`, :pr:`3317`, :issue:`1896`)
--------------------
[1.0.0] - 2025-11-27
--------------------

**Breaking Changes**
**Breaking changes**

- The ``reference_sequence`` argument to ``TreeSequence.alignments`` is now required
to be the same length as the tree sequence. Previously it was required to be the length
of the requested interval.
- The ``reference_sequence`` argument to ``TreeSequence.alignments`` is now
required to be the same length as the tree sequence. Previously it was
required to be the length of the requested interval.
(:user:`benjeffery`, :pr:`3317`)

----------------------
[1.0.0b3] - 2025-10-15
----------------------

**Breaking Changes**

- ``TreeSequence.tables`` now returns a zero-copy immutable view of the tables.
To get a mutable copy, use ``TreeSequence.dump_tables()``.
(:user:`benjeffery`, :pr:`3288`, :issue:`760`)

- For a tree sequence to be valid mutation parents in the table collection
- For a tree sequence to be valid, the mutation parents in the table collection
must be correct and consistent with the topology of the tree at each mutation site.
``TableCollection.tree_sequence()`` will raise a ``_tskit.LibraryError`` if this
is not the case.
(:user:`benjeffery`, :issue:`2729`, :issue:`2732`, :pr:`3212`).

- Drop Python 3.9 support, require Python >= 3.10 (:pr:`3267`, :user:`benjeffery`)
- Drop Python 3.9 support and require Python >= 3.10.
(:pr:`3267`, :user:`benjeffery`)

- ``ltrim``, ``rtrim``, ``trim`` and ``shift`` raise an error if they are
used on a tree sequence containing a reference sequence.
(:user:`hyanwong`, :pr:`3210`, :issue:`2091`)

**Features**

- Add ``tskit.jit.numba.jitwrap`` and ``NumbaTreeSequence`` to allow simplified
use and development of numba-jitted functions with tree sequences. See the
use and development of Numba-jitted functions with tree sequences. See the
`documentation <https://tskit.dev/tskit/docs/stable/numba.html>`_ for details.
(:user:`andrewkern`, :pr:`3295`, :issue:`3294`)

- ``TreeSequence.map_to_vcf_model`` now also returns the transformed positions and
contig length. (:user:`benjeffery`, :pr:`3174`, :issue:`3173`)

- ``draw_svg()`` methods now associate tree branches with edge IDs
- ``draw_svg()`` methods now associate tree branches with edge IDs.
(:user:`hyanwong`, :pr:`3193`, :issue:`557`)

- ``draw_svg()`` methods now allow the y-axis to be placed on the right-hand side
using ``y_axis="right"`` (:user:`hyanwong`, :pr:`3201`)
using ``y_axis="right"``. (:user:`hyanwong`, :pr:`3201`)

- Add ``contig_id`` and ``isolated_as_missing`` to ``VcfModelMapping``
(:user:`benjeffery`, :pr:`3219`, :issue:`3177`)
(:user:`benjeffery`, :pr:`3219`, :issue:`3177`).

- Add ``TreeSequence.mutations_edge`` which returns the edge ID for each mutation's
- Add ``TreeSequence.mutations_edge``, which returns the edge ID for each mutation's
edge. (:user:`benjeffery`, :pr:`3226`, :issue:`3189`)

- Add ``TreeSequence.sites_ancestral_state``, ``TreeSequence.mutations_derived_state`` and
``TreeSequence.mutations_inherited_state`` properties to return the ancestral state of sites,
derived state of mutations and inherited state of mutations as NumPy arrays of
the new numpy 2.0 StringDType.
``TreeSequence.mutations_inherited_state`` properties to return the ancestral state of sites,
the derived state of mutations and the inherited state of mutations as NumPy arrays of
the new NumPy 2.0 ``StringDType``.
(:user:`benjeffery`, :pr:`3228`, :issue:`2632`, :pr:`3276`, :issue:`2631`)

- Tskit now distributes with a requirement of numpy version 2 or greater. However, you can still use
tskit with numpy 1.X by building tskit from source with numpy 1.X using ``pip install tskit --no-binary tskit``.
With numpy 1.X, any use of the new StringDType properties will result in a ``RuntimeError``.
If you try to use another python module that was compiled against numpy 1.X with numpy 2.X you may see
the error "A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash.".
If no newer version of the module is available you will have to use the Numpy 1.X build as above.
- Tskit now requires NumPy version 2 or later. However, you can still use
tskit with NumPy 1.x by building tskit from source with NumPy 1.x using
``pip install tskit --no-binary tskit``. With NumPy 1.x, any use of the new
``StringDType`` properties will result in a ``RuntimeError``. If you try to
use another Python module that was compiled against NumPy 1.x with NumPy 2.x
you may see the error "A module that was compiled using NumPy 1.x cannot be
run in NumPy 2.0.0 as it may crash.". If no newer version of the module is
available you will have to use the NumPy 1.x build as above.

- Add ``Mutation.inherited_state`` property which returns the inherited state
for a single mutation. (:user:`benjeffery`, :pr:`3277`, :issue:`2631`)
Expand All @@ -79,6 +72,11 @@ Unreleased

- Add ``TreeSequence.divergence_matrix``, which was previously undocumented.

- ``TreeSequence.variants``, ``.genotype_matrix``, ``.haplotypes``, and ``.alignments`` methods
now fully support ``isolated_as_missing`` behaviour with internal nodes. ``.alignments`` is
also around 10% faster.
(:user:`benjeffery`, :pr:`3313`, :pr:`3317`, :issue:`1896`)

**Bugfixes**

- In some tables with mutations out-of-order ``TableCollection.sort`` did not re-order
Expand All @@ -89,16 +87,17 @@ Unreleased
their original order in the tables. (:user:`benjeffery`, :pr:`3257`, :issue:`3253`)

- Fix bug in ``TreeSequence.genetic_relatedness_vector`` that previously ignored
``span_normalise``: previously, ``span_normalise`` was always set to ``False``;
now the default is ``True`` in agreement with other statistics, so the returned
values will change. (:user:`petrelharp`, :pr:`3300`, :issue:`3241`)
``span_normalise``: previously, ``span_normalise`` was always set to ``False``;
now the default is ``True`` in agreement with other statistics, so the returned
values will change. (:user:`petrelharp`, :pr:`3300`, :issue:`3241`)

- Fix bug in ``TreeSequence.pair_coalescence_counts`` when ``span_normalise=True``
and a window breakpoint falls within an internal missing interval.
(:user:`nspope`, :pr:`3176`, :issue:`3175`)

- Fix metadata schemas that are equal but have different byte representations not being equal
when using ``TableCollection.assert_equals`` and ``Table.assert_equals``.
- Fix metadata schemas that are equal but have different byte representations not
being considered equal when using ``TableCollection.assert_equals`` and
``Table.assert_equals``.
(:user:`benjeffery`, :pr:`3246`, :issue:`3244`)

- k-way statistics no longer require k sample sets, allowing in particular
Expand All @@ -110,18 +109,13 @@ Unreleased
values with mutations over roots.
(:user:`benjeffery`, :pr:`3274`, :issue:`3273`)

- Prevent iterating over a ``TopologyCounter``
(:user:`benjeffery` , :pr:`3202`, :issue:`1462`)
- Prevent iterating over a ``TopologyCounter``.
(:user:`benjeffery`, :pr:`3202`, :issue:`1462`)

- Fix ``TreeSequence.concatenate()`` to work with internal samples by using the
``all_mutations`` and ``all_edges`` parameters in ``union()``
``all_mutations`` and ``all_edges`` parameters in ``union()``.
(:user:`hyanwong`, :pr:`3283`, :issue:`3181`)

**Breaking changes**

- ``ltrim``, ``rtrim``, ``trim`` and ``shift`` raise an error if used on a tree sequence
containing a reference sequence (:user:`hyanwong`, :pr:`3210`, :issue:`2091`)

--------------------
[0.6.4] - 2025-05-21
--------------------
Expand Down
5 changes: 5 additions & 0 deletions python/tests/test_immutable_table_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ def test_immutable_has_method_or_mutator(self, ts_fixture):
for name in dir(tc):
if name.startswith("_"):
continue
# Use getattr_static first so we don't trigger properties like
# the deprecated ``name_map`` attribute, which emits warnings.
attr = inspect.getattr_static(tc, name)
if isinstance(attr, property):
continue
attr = getattr(tc, name)
if inspect.ismethod(attr) and getattr(attr, "__self__", None) is tc:
tc_methods.append(name)
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_lowlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5089,7 +5089,7 @@ def test_kastore_version(self):

def test_tskit_version(self):
version = _tskit.get_tskit_version()
assert version == (1, 2, 0)
assert version == (1, 3, 0)

def test_tskit_version_file(self):
maj, min_, patch = _tskit.get_tskit_version()
Expand Down
2 changes: 1 addition & 1 deletion python/tskit/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Definitive location for the version number.
# During development, should be x.y.z.devN
# For beta should be x.y.zbN
tskit_version = "1.0.0b3"
tskit_version = "1.0.0"