Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]#
Added#
Changed#
Fixed#
[0.4.0] - 2026-10-26#
Added#
treedata.io.write_nwkandTreeData.write_nwkto write the trees inobstto a Newick (.nwk) file, the counterpart oftreedata.io.read_nwk. Thelengthof the edges is written as branch lengths, andread_nwkreads the result back to the same trees (#108)treedata.io.read_nwkto read Newick (.nwk) tree files into aTreeDatawith the leaves as observations and no variables. Branch lengths are stored as thelengthof the edges and the distance from the root as thetimeof the nodes. Quoted labels, comments, internal node labels (numbers are stored assupport), unnamed nodes and files with several trees are supported.alignment="nodes"makes all nodes, instead of only the leaves, observations (#105)treedata.iomodule, which also exposesread_h5td,read_zarr,read_tree_elemsandwrite_tree_elems.read_h5tdandread_zarrremain available astreedata.read_h5tdandtreedata.read_zarr, as withanndata(#105)write_tree_elemsandread_tree_elemsto store the tree elements (obst,vart,label,allow_overlap,alignment) of aTreeDatain an existing AnnData group.mudatauses them so that aTreeDatamodality of aMuDatakeeps its trees throughwrite_h5mu/write_zarr/write_h5adand read (requires a mudata version that calls them) (#103)
Changed#
Fixed#
[0.3.1] - 2026-07-08#
Added#
Changed#
Require
anndata>=0.13(and consequently Python>=3.12, which anndata 0.13 requires) (#88)
Fixed#
TreeData.__getitem__now delegatesanndata.accaccessor indexers (AdRef,MapAcc,RefAcc) toAnnData.__getitem__instead of routing them through_normalize_indices. This fixes anIndexError: Unknown indexerfromobs_vector/var_vector(and anyvar_names/layer column lookup) under anndata ≥ 0.13 (#88)
[0.3.0] - 2026-07-07#
Added#
Changed#
Require
zarr>=3(anndata 0.13 no longer supports zarr <3). Removed the deadzarr<3(ZARR_V2) code branches and the deadanndata<0.11(USE_EXPERIMENTAL) code branches now that the supported floors exceed them (#88)Zarr writes now store
obst/vartin a columnar layout (one array per node/edge attribute key) instead of a single JSON scalar. Dense numeric/boolean columns use native dtypes; ragged or complex columns fall back to per-element JSON. This fixes aTypeError: string too large to store inside arraycrash when writing large trees to zarr v3 (#86)dtypeparameter inTreeData.__init__is now deprecated; passing it raises aFutureWarningand has no effect, matching anndata’s removal of this argumentobsm,varm,layers,raw,shape,filename,filemode,asview, and related parameters inTreeData.__init__are now keyword-only, matching the anndata 0.13.x APIAdded compatibility with anndata 0.13.x: removed
dtypefrom internal_init_as_actualcall, which was removed from AnnData in 0.13.xAdded compatibility with anndata 0.13.x “Unify X and layers” change:
layers.copy()anddict(layers)no longer include the internalNonekey (used to store X) in_mutated_copyand write routines
Fixed#
Fixed
UserWarning: Duplicate name: 'zarr.json'spam when writing to a zarrZipStoreby staging the write in aMemoryStoreand copying to theZipStoreonce (#86)read_zarrnow auto-detects.zippaths and opens them as aZipStore(#86)Node/edge attributes explicitly set to
Noneare now preserved through a zarr round-trip and kept distinct from absent attributes (#86)Rewriting into an existing zarr group now removes trees that are no longer present, so the persisted tree set matches the
TreeDatabeing written (#86)
[0.2.5] - 2026-04-20#
Added#
Changed#
Updated anndata dependency (#75)
Fixed#
Removed pathlib dependency (#83)
[0.2.4] - 2025-11-05#
Added#
Changed#
Deprecated
TreeData.obst_keysandTreeData.vart_keysfor consistency with AnnData (https://github.com/scverse/anndata/pull/2093) (#73)
Fixed#
Added support for zarr v3 (#73)
Eliminated deprecations warnings from AnnData>=0.12.0 (#73)
[0.2.3] - 2025-10-14#
Added#
Changed#
Optimized tree overlap detection to speed up copying and subsetting with many trees (#66)
Switch to hatch with v0.0.6 template update (#61)
Fixed#
Fixed codecov configuration (#64)
[0.2.2] - 2025-09-18#
Added#
tdata.has_overlapparameter to check whether theTreeDataobject contains overlapping trees (#59)
Changed#
Default value for
tdata.allow_overlapis nowTrue(#60)
Fixed#
[0.2.1] - 2025-07-10#
Added#
support for instantiating
TreeDataobjects with only the tree structure (#56)
Changed#
Updated docs to clarify all the ways
TreeDatacan be instantiated (#56)
Fixed#
[0.2.0] - 2025-06-16#
Added#
alignmentparameter which allows forobs_namesandvar_namesaligned to either the leaves, nodes, or a subset of leaves and nodes in trees stored in theobstandvartfields. Added a tutorial describing howalignmentworks (#55)
Changed#
read_h5adandwrite_h5adand been renamedread_h5tdandwrite_h5tdto clarify that thetreedataformat differs fromanndata.read_h5adandwrite_h5adwill be removed inv1.0.0(#56)
Fixed#
Fixed typing issues (#51)
[0.1.3] - 2025-01-20#
Added#
Changed#
Fixed#
Fixed typing issues (#51)
Fixed
ImportError: zarr-python major version > 2 is not supported'error with Python 12 (#46)
[0.1.2] - 2024-12-02#
Added#
Changed#
Fixed#
Fixed
KeyError: "Unable to synchronously open object (object 'X' doesn't exist)"'when reading h5ad without X field (#40)
[0.1.1] - 2024-11-25#
Added#
Axis in
td.concatcan now be specified withobsandvar(#40)
Changed#
Fixed#
Fixed
ImportError: cannot import name '_resolve_dim' from 'anndata._core.merge'caused by anndata update (#40)
[0.1.0] - 2024-09-27#
Added#
Changed#
Encoding of
treedataattributes in h5ad and zarr files.label,allow_overlap,obst, andvartare now separate fields in the file. (#31)
Fixed#
TreeDataobjects with.rawspecified can now be read (#31)
[0.0.4] - 2024-09-02#
Added#
Changed#
Fixed#
Fixed typing bug introduced by anndata update (#29)
[0.0.3] - 2024-08-21#
Added#
Add concatenation tutorial to documentation (#27)
Changed#
obstandvartcreate local copy ofnx.DiGraphsthat are added (#26)TreeData.labelvalue remains the same aftertd.concatas long as alllabelvalues are the same for all objects (#27)
Fixed#
Fixed bug which caused key to be listed twice in
labelcolumn after value update inobstorvart(#26)
[0.0.2] - 2024-06-18#
Changed#
Empty trees are now allowed to avoid error on subsetting (#13)
How trees are stored in h5ad and zarr files (#16)
Format of label column with multiple trees ([1,2] -> 1,2) (#16)
Fixed#
Fixed issue with slow read/write of large trees
[0.0.1] - 2024-05-13#
Added#
TreeData class for storing and manipulating trees
Read/write trees to h5ad and zarr files
Concatenate trees with similar API to AnnData