tskit-dev / tstrait

Quantitative trait simulation for ARGs
https://tskit.dev/software/tstrait
MIT License
7 stars 6 forks source link

CODE: New API #110

Closed daikitag closed 11 months ago

daikitag commented 12 months ago

New tstrait API

daikitag commented 12 months ago

This will fail, as I haven't written the tests for new functions, but I just wanted to make a PR at first to receive some feedback.

daikitag commented 12 months ago

The pytest is failing because of the name error (genetic_value.py and genetic_value function), and I will modify it afterwards.

daikitag commented 12 months ago

I hope the suggestions made here resolves https://github.com/tskit-dev/tstrait/issues/103

jeromekelleher commented 12 months ago

I really do think we should write things as simply and cleanly as we can first, and optimise for performance in the nonzero alpha case later.

Duplicating code is a bad idea, and you should only do it when there's a compelling reason. I've not seen a compelling reason, particularly when we're actually doing unnecessary work at the moment for alpha of zero (which I assume is a common case).

daikitag commented 11 months ago

Closed due to updates in https://github.com/tskit-dev/tstrait/pull/111 and https://github.com/tskit-dev/tstrait/pull/112