Changelog#
[0.1.3] - 2026-xx-xx#
In development
Highlights#
Extended
genetic_valuewithlevel="individual"(default),level="node", andlevel="edge"to return genetic values for the corresponding entities. #189Added
edge_effectto compute introduced effects on edges #189genetic_valuecomputes 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 #194genetic_valueandsim_phenotypetake anum_threadsargument, 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_valueandedge_effectnow raise aValueErrorif asite_idin 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#
Fix#
[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_geneticfunction is no longer supported, and users should be usinggenetic_valuefunction instead. The newgenetic_valuefunction uses trait dataframe as an input, butrandom_seedis not a necessary argument, as there is no randomness involved. The frequency dependence architecture is implemented insim_traitfunction instead ofsim_geneticfunction, so users should put thealphaparameter insim_traitfunction instead.negativeinput in exponential and gamma distribution trait models are no longer supported, and users should be usingrandom_signinstead #114
Update:#
Remove
num_causaldependence on simulating effect sizes #107Add options to simulate effect sizes from
random_signin fixed value trait model #109Add frequency dependence architecture in
sim_traitfunction, and allele frequency is given as an output as well #111Implement
genetic_valuefunction to compute genetic values based on the trait dataframe. There is no randomness involved, and frequency dependence architecture is not implemented #112Add option to input the causal site IDs, instead of randomly selecting them in
sim_phenotypeandsim_traitfunctions #124Add
normalise_phenotypesfunction to normalize the simulated phenotypes #130Add delta degrees of freedom input in
normalise_phenotypesfunction #136Add
normalise_genetic_valuefunction 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_causalargument #99Remove
# pragma: no coverin certain functions #119Modify default input arguments of
sim_trait,sim_envandsim_phenotypefunctions #120Add
verification.pyfor statistical tests #129Add statistical tests against external simulators #132
Change the dtype of
trait_idinput ingenetic_valuefunction #134Add density plot in
verification.py#138Add multithreading in
verification.py#139Conduct 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_traitfunction #115Documentation for
random_signinput in trait distribution models #122Modify 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:#
Documentation:#
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