Changelog#

[0.1.3] - 2026-xx-xx#

In development

Highlights#

  • Extended genetic_value with level="individual" (default), level="node", and level="edge" to return genetic values for the corresponding entities. #189

  • Added edge_effect to compute introduced effects on edges #189

  • genetic_value computes every causal site of every trait in one pass over the trees, instead of taking each causal site on its own. Traits with rare causal sites are over 200 times faster; traits whose causal sites are mostly common variants are close to unchanged #194

  • genetic_value and sim_phenotype take a num_threads argument, dividing the causal sites between that many worker threads. The default of 0 does the work on the calling thread. Up to 3.4 times faster on four threads, and less on a tree sequence big enough that the per-thread arrays leave cache #194

Breaking changes#

  • genetic_value and edge_effect now raise a ValueError if a site_id in the trait dataframe is not a valid site ID in the tree sequence. Negative values previously wrapped around to the end of the site table #193

Documentation#

  • Added a worked example relating causal-allele effects, edge effects, and edge, node, and individual genetic values #189

  • Clarified that tstrait currently uses a site-mode effect model #189

Fix#

  • Fix an out-of-bounds write in the node traversal when the causal allele is the ancestral allele, in which case the virtual root is a causal node #192, #191.

[0.1.2] - 2026-03-03#

Maintenance release

  • Upgrade supported Python versions to 3.11 -> 3.14

[0.1.1] - 2025-09-18#

Update:#

  • Generalise the traversal algorithm to return node values #154

  • Upgrade supported Python versions to 3.10 -> 3.13

[0.1.0] - 2024-03-07#

Breaking changes:#

  • sim_genetic function is no longer supported, and users should be using genetic_value function instead. The new genetic_value function uses trait dataframe as an input, but random_seed is not a necessary argument, as there is no randomness involved. The frequency dependence architecture is implemented in sim_trait function instead of sim_genetic function, so users should put the alpha parameter in sim_trait function instead.

  • negative input in exponential and gamma distribution trait models are no longer supported, and users should be using random_sign instead #114

Update:#

  • Remove num_causal dependence on simulating effect sizes #107

  • Add options to simulate effect sizes from random_sign in fixed value trait model #109

  • Add frequency dependence architecture in sim_trait function, and allele frequency is given as an output as well #111

  • Implement genetic_value function to compute genetic values based on the trait dataframe. There is no randomness involved, and frequency dependence architecture is not implemented #112

  • Add option to input the causal site IDs, instead of randomly selecting them in sim_phenotype and sim_trait functions #124

  • Add normalise_phenotypes function to normalize the simulated phenotypes #130

  • Add delta degrees of freedom input in normalise_phenotypes function #136

  • Add normalise_genetic_value function to normalize the genetic values #145

Fix:#

  • Raise error when there are no individuals #97

  • Raise error when incorrect values are given in the num_causal argument #99

  • Remove # pragma: no cover in certain functions #119

  • Modify default input arguments of sim_trait, sim_env and sim_phenotype functions #120

  • Add verification.py for statistical tests #129

  • Add statistical tests against external simulators #132

  • Change the dtype of trait_id input in genetic_value function #134

  • Add density plot in verification.py #138

  • Add multithreading in verification.py #139

  • Conduct exact tests against AlphaSimR, simplePHENOTYPES and the simulation framework described in ARG-Needle paper in verification.py #140

Documentation:#

  • Modify introduction #96

  • Document ploidy #98

  • Documentation for the new sim_trait function #115

  • Documentation for random_sign input in trait distribution models #122

  • Modify phrasing in documentation #123

  • Documentation for specifying causal site IDs #126

  • Documentation for modifying the numericalization of genotypes #133

  • Modify the frequency dependence explanation in the documentation #141

  • Fix typo in documentation #142

[0.0.1] - 2023-09-05#

Highlights:#

  • Initial stable release of tstrait in PyPI https://pypi.org/project/tstrait/

  • Initial stable release of tstrait in conda-forge

Documentation:#

  • tstrait description in https://tskit.dev/software/

Contributors:#

  • Jerome Kelleher

  • Ben Jeffery

  • Gertjan Bisschop

  • Daiki Tagami

[0.0.1a5] - 2023-09-05#

Test release of the package before releasing it to conda-forge

Contributors:#

  • Jerome Kelleher

  • Ben Jeffery

  • Gertjan Bisschop

  • Daiki Tagami

[0.0.1a2] - 2023-08-25#

Highlights:#

  • Release of tstrait documentation in https://tskit.dev/tstrait/docs/latest/

Fix:#

  • Hide private functions and classes #73

  • Modify docstring explanations and examples #76

Documentation:#

  • Create infrastructure for documentation #77

  • Build initial documentation #78

  • Add Changelog to documentation #79

Contributors:#

  • Daiki Tagami

  • Gertjan Bisschop

  • Jerome Kelleher

[0.0.1a1] - 2023-08-22#

Initial alpha release of the package.

Contributors:#

  • Daiki Tagami

  • Gertjan Bisschop

  • Jerome Kelleher