Python 0.3.3
Minor feature release
Features
-
Add
TreeSequence.genetic_relatedness
for calculating genetic relatedness between
pairs of sets of nodes (@brieuclehmann, #1021, #1023, #974, #973, #898). -
Expose
TreeSequence.coiterate()
method to allow iteration over 2 sequences
simultaneously, aiding comparison of trees from two sequences
(@jeromekelleher, @hyanwong, #1021, #1022). -
tskit is now supported on, and has wheels for, python3.9
(@benjeffery, #982, #907). -
Tree.newick()
now has extra optioninclude_branch_lengths
to allow branch
lengths to be omitted (@hyanwong, #931). -
Added
Tree.generate_star
static method to create star-topologies (@hyanwong,
#934). -
Added
Tree.generate_comb
andTree.generate_balanced
methods to create
example trees. (@jeromekelleher, #1026). -
Added
equals
method to TreeSequence, TableCollection and each of the tables which
provides more flexible equality comparisons, for example, allowing
users to ignore metadata or provenance in the comparison
(@mufernando, @jeromekelleher, #896, #897,
#913, #917). -
Added
__eq__
to TreeSequence
(@benjeffery, #1011, #1020). -
ts.dump
andtskit.load
now support reading and writing file objects such as
FIFOs and sockets (@benjeffery, #657, #909). -
Added
tskit.write_ms
for writing to MS format
(@saurabhbelsare, #727, #854). -
Added
TableCollection.indexes
for access to the edge insertion/removal order indexes
(@benjeffery, #4, #916). -
The dictionary representation of a TableCollection now contains its index
(@benjeffery, #870, #921). -
Added
TreeSequence._repr_html_
for use in jupyter notebooks
(@benjeffery, #872, #923). -
Added
TreeSequence.__str__
to display a summary for terminal usage
(@benjeffery, #938, #985). -
Added
TableCollection.dump
andTableCollection.load
. This allows table
collections that are not valid tree sequences to be manipulated
(@benjeffery, #14, #986). -
Added
nbytes
method to tables,TableCollection
andTreeSequence
which
reports the size in bytes of those objects
(@jeromekelleher, @benjeffery, #54, #871). -
Added
TableCollection.clear
to clear data table rows and optionally
provenances, table schemas and tree-sequence level metadata and schema
(@benjeffery, #929, #1001).
Bugfixes
-
LightWeightTableCollection.asdict
andTableCollection.asdict
now return copies
of arrays (@benjeffery, #1025, #1029). -
The
map_mutations
method previously used the Fitch parsimony method, but this
does not produce parsimonious results on non-binary trees. We now now use the
Hartigan parsimony algorithm, which does (@jeromekelleher,
#987, #1030). -
The
flag
argument to tables'add_row
was treating the value as signed
(@benjeffery, #1027, #1031).
Breaking changes
- The argument to
ts.dump
andtskit.load
has been renamedfile
frompath
. - All arguments to
Tree.newick()
except precision are now keyword-only. - Renamed
ts.trait_regression
tots.trait_linear_model
.