There is a newer version of the record available.

Published October 3, 2022 | Version 0.5.3

tskit-dev/tskit: Python 0.5.3

Description

Fixes

  • The Variant object can now be initialized with 64 bit numpy ints as returned e.g. from np.where (@hyanwong, #2518, #2514)

  • Fix tree.mrca for the case of a tree with multiple roots. (@benjeffery, #2533, #2521)

Features

  • The ts.nodes method now takes an order parameter so that nodes can be visited in time order (@hyanwong, #2471, #2370)

  • Add samples argument to TreeSequence.genotype_matrix. Default is None, where all the sample nodes are selected. (@szhan, #2493, #678)

  • ts.draw and the draw_svg methods now have an optional omit_sites parameter, aiding drawing large trees with many sites and mutations (@hyanwong, #2519, #2516)

Breaking Changes

  • Single statistics computed with TreeSequence.general_stat are now returned as numpy scalars if windows=None, AND; samples is a single list or None (for a 1-way stat), OR indexes is None or a single list of length k (instead of a list of length-k lists). (@gtsambos, #2417, #2308)

  • Accessor methods such as ts.edge(n) and ts.node(n) now allow negative indexes (@hyanwong, #2478, #1008)

  • ts.subset() produces valid tree sequences even if nodes are shuffled out of time order (@hyanwong, #2479, #2473), and the same for tables.subset() (@hyanwong, #2489). This involves sorting the returned tables, potentially changing the returned edge order.

Performance improvements

  • TreeSequence.link_ancestors no longer continues to process edges once all of the sample and ancestral nodes have been accounted for, improving memory overhead and overall performance (@gtsambos, #2456, #2442)

Files

tskit-dev/tskit-0.5.3.zip

Files (1.2 MB)

Name Size
md5:8779bf1f5e73b9c188c933012338ef0a
1.2 MB Preview Download

Additional details

Related works