Releases: tskit-dev/tskit
C API 0.99.13
Bugfix release
Fixes
- Fix segfault when very large columns overflow
(@bhaller, @benjeffery, #1509, #1511).
Python 0.3.6
Minor feature release
Notebook detailing the new features here: https://gist.github.com/benjeffery/aff619fd8da6799bccab81655c391965
Breaking changes
Mutation.positionandMutation.indexwhich 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.appendmethod for adding rows from classes such asSiteTableRowand
Site(@benjeffery, #1111, #1254). -
SVG visualization of a tree sequence can be restricted to displaying between left
and right genomic coordinates using thex_limparameter. 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_mutationsparam (@hyanwong,#1253, #1258). -
Entity classes such as
Mutation,Nodeare now python dataclasses
(@benjeffery, #1261). -
Metadata decoding for table row access is now lazy (@benjeffery, #1261).
-
Add html notebook representation for
Treeand changeTree.__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_equalsandTableCollection.assert_equalswhich give an exact
report of any differences. (@benjeffery,#1076, #1328)
Changes
- In drawing methods
max_tree_heightandtree_height_scalehave been deprecated
in favour ofmax_timeandtime_scale
(@benjeffery,#1262, #1331).
Fixes
- Tree sequences were not properly init'd after unpickling
(@benjeffery, #1297, #1298)
C API 0.99.12
Minor feature release
Breaking changes
- Removed
TSK_NO_BUILD_INDEXES.
Not building indexes is now the default behaviour oftsk_table_collection_dumpand related functions.
(@molpopgen, #1327, #1337).
Features
- Add
tsk_*_table_extendmethods to append to a table from another
(@benjeffery, #1271, #1287)
Python 0.3.5
Breaking changes
- tskit now requires Python 3.7 (@benjeffery, #1235)
Features
-
SVG visualization plots mutations at the correct time, if it exists, and a y-axis,
with label can be drawn. Both x- and y-axes can be plotted on trees as well as
tree sequences (@hyanwong,#840, #580, #1236) -
SVG visualization now uses squares for sample nodes and red crosses for mutations,
with the site/mutation positions marked on the x-axis. Additionally, an x-axis
label can be set (@hyanwong,#1155, #1194, #1182, #1213) -
Add
parentscolumn to the individual table to allow recording of pedigrees
(@ivan-krukov, @benjeffery, #852, #1125, #866, #1153, #1177, #1192 #1199). -
Added
Tree.generate_random_binarystatic method to create random
binary trees (@hyanwong, @jeromekelleher, #1037). -
Change the default behaviour of Tree.split_polytomies to generate
the shortest possible branch lengths instead of a fixed epsilon of
1e-10. (@jeromekelleher, #1089, #1090) -
Default value metadata in
add_rowfunctions is now schema-dependant, so that
metadata={}is no longer needed as an argument when a schema is present
(@benjeffery, #1084). -
defaultin metadata schemas is used to fill in missing values when encoding for
the struct codec. (@benjeffery, #1073, #1116). -
Added
canonicaloption to table collection sorting (@mufernando,
@petrelharp, #705) -
Added various arguments to
TreeSequence.subset, to allow for stable
population indexing and lossless node reordering with subset.
(@petrelharp, #1097)
Changes
-
Allow mutations that have the same derived state as their parent mutation.
(@benjeffery, #1180, #1233) -
File minor version change to support individual parents
C API 0.99.11
Features
-
Add
parentsto the individual table to enable recording of pedigrees
(@ivan-krukov, @benjeffery, #852, #1125, #866, #1153, #1177, #1199). -
Added a
tsk_table_collection_canonicalsemethod, that allows checking for equality between
tables that are equivalent up to reordering (@petrelharp, @mufernando, #1108). -
Removed a previous requirement on
tsk_table_collection_union, allowing for unioning of
new information both above and below shared history (@petrelharp, @mufernando, #1108). -
Support migrations in tsk_table_collection_sort. (@jeromekelleher,
#22, #117, #1131).
Breaking changes
-
Method
tsk_individual_table_add_rowhas an extra argumentsparentsandparents_length. -
Add an
optionsargument totsk_table_collection_subset(@petrelharp, #1108),
to allow for retaining the order of populations. -
Mutation error codes have changed
Changes
-
Allow mutations that have the same derived state as their parent mutation.
(@benjeffery, #1180, #1233) -
File minor version change to support individual parents
C API 0.99.10
Minor change to internal APIs
C API 0.99.9
Python 0.3.4
Minor bugfix release.
Bugfixes
- Reinstate the unused zlib_compression option to tskit.dump, as msprime < 1.0 still uses it (@jeromekelleher, #1067).
Python 0.3.3
Minor feature release
Features
-
Add
TreeSequence.genetic_relatednessfor 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_lengthsto allow branch
lengths to be omitted (@hyanwong, #931). -
Added
Tree.generate_starstatic method to create star-topologies (@hyanwong,
#934). -
Added
Tree.generate_combandTree.generate_balancedmethods to create
example trees. (@jeromekelleher, #1026). -
Added
equalsmethod 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.dumpandtskit.loadnow support reading and writing file objects such as
FIFOs and sockets (@benjeffery, #657, #909). -
Added
tskit.write_msfor writing to MS format
(@saurabhbelsare, #727, #854). -
Added
TableCollection.indexesfor 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.dumpandTableCollection.load. This allows table
collections that are not valid tree sequences to be manipulated
(@benjeffery, #14, #986). -
Added
nbytesmethod to tables,TableCollectionandTreeSequencewhich
reports the size in bytes of those objects
(@jeromekelleher, @benjeffery, #54, #871). -
Added
TableCollection.clearto clear data table rows and optionally
provenances, table schemas and tree-sequence level metadata and schema
(@benjeffery, #929, #1001).
Bugfixes
-
LightWeightTableCollection.asdictandTableCollection.asdictnow return copies
of arrays (@benjeffery, #1025, #1029). -
The
map_mutationsmethod 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
flagargument to tables'add_rowwas treating the value as signed
(@benjeffery, #1027, #1031).
Breaking changes
- The argument to
ts.dumpandtskit.loadhas been renamedfilefrompath. - All arguments to
Tree.newick()except precision are now keyword-only. - Renamed
ts.trait_regressiontots.trait_linear_model.
C API 0.99.8
Minor feature release
New features
-
Add
tsk_treeseq_genetic_relatednessfor calculating genetic relatedness between
pairs of sets of nodes (@brieuclehmann, #1021, #1023, #974, #973, #898). -
Exposed
tsk_table_collection_set_indexesto the API
(@benjeffery, #870, #921).
Breaking changes
-
Added an
optionsargument totsk_table_collection_equals
and table equality methods to allow for more flexible equality criteria
(e.g., ignore top-level metadata and schema or provenance tables).
Existing code should add an extra final parameter0to retain the
current behaviour (@mufernando, @jeromekelleher,
#896, #897, #913, #917). -
Changed default behaviour of
tsk_table_collection_clearto not clear
provenances and addedoptionsargument to optionally clear provenances
and schemas (@benjeffery, #929, #1001). -
Renamed
tsk_treeseq_trait_regressiontotsk_treeseq_trait_linear_model.