Skip to content

Python 0.3.6

Compare
Choose a tag to compare
@benjeffery benjeffery released this 14 May 12:57
· 1149 commits to main since this release
910e81d

Minor feature release

Notebook detailing the new features here: https://gist.github.com/benjeffery/aff619fd8da6799bccab81655c391965

Breaking changes

  • Mutation.position and Mutation.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
    of Tree (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 as SiteTableRow and
    Site (@benjeffery, #1111, #1254).

  • SVG visualization of a tree sequence can be restricted to displaying between left
    and right genomic coordinates using the x_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 the all_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 change Tree.__str__ from dict
    representation to info table. (@benjeffery, #1269, #1304).

  • Improve display of tables when printed, limiting lines set via
    tskit.set_print_options (@benjeffery,#1270, #1300).

  • Add Table.assert_equals and TableCollection.assert_equals which give an exact
    report of any differences. (@benjeffery,#1076, #1328)

Changes

  • In drawing methods max_tree_height and tree_height_scale have been deprecated
    in favour of max_time and time_scale
    (@benjeffery,#1262, #1331).

Fixes