Python 0.3.6
Minor feature release
Notebook detailing the new features here: https://gist.github.com/benjeffery/aff619fd8da6799bccab81655c391965
Breaking changes
Mutation.position
andMutation.index
which were deprecated in 0.2.2 (Sep '19) have
been removed.
Features
-
Add direct, copy-free access to the arrays representing the quintuply-linked structure
ofTree
(e.g.left_child_array
). Allows performant algorithms over the tree
structure using, for example, numba
(@jeromekelleher, #1299, #1320). -
Add fancy indexing to tables. E.g.
table[6:86]
returns a new table with the
specified rows. Supports slices, index arrays and boolean masks
(@benjeffery, #1221, #1348, #1342). -
Add
Table.append
method for adding rows from classes such asSiteTableRow
and
Site
(@benjeffery, #1111, #1254). -
SVG visualization of a tree sequence can be restricted to displaying between left
and right genomic coordinates using thex_lim
parameter. The default settings
now mean that if the left or right flanks of a tree sequence are entirely empty,
these regions will not be plotted in the SVG (@hyanwong, #1288). -
SVG visualization of a single tree allows all mutations on an edge to be plotted
via theall_edge_mutations
param (@hyanwong,#1253, #1258). -
Entity classes such as
Mutation
,Node
are now python dataclasses
(@benjeffery, #1261). -
Metadata decoding for table row access is now lazy (@benjeffery, #1261).
-
Add html notebook representation for
Tree
and changeTree.__str__
from dict
representation to info table. (@benjeffery, #1269, #1304). -
Improve display of tables when
print
ed, limiting lines set via
tskit.set_print_options
(@benjeffery,#1270, #1300). -
Add
Table.assert_equals
andTableCollection.assert_equals
which give an exact
report of any differences. (@benjeffery,#1076, #1328)
Changes
- In drawing methods
max_tree_height
andtree_height_scale
have been deprecated
in favour ofmax_time
andtime_scale
(@benjeffery,#1262, #1331).
Fixes
- Tree sequences were not properly init'd after unpickling
(@benjeffery, #1297, #1298)