bug in haplotypes_from_align
What happens
- An exception is raised when using
haplotypes_from_alignwith optionimpute_threshold.
How does it happen
- This line causes the error
haps2 = egglib.stats.haplotypes_from_align(aln2, max_missing=0.5, impute_threshold=3)
What is the result
- In case of a Python exception, provide the full traceback. Show us whatever is displayed and might be informative.
File "/home/stephane/data/projects/methodo/egglib/training/2025-montpellier/egglib-training/pres/examples/stats1.py", line 25, in <module>
haps2 = egglib.stats.haplotypes_from_align(aln2, max_missing=0.5, impute_threshold=3)
File "/home/stephane/.local/lib/python3.13/site-packages/egglib/stats/_haplotypes.py", line 87, in haplotypes_from_align
return _haplotypes(aln, max_missing, impute_threshold, struct, dest, multiple)
File "/home/stephane/.local/lib/python3.13/site-packages/egglib/stats/_haplotypes.py", line 176, in _haplotypes
site.reset(pl)
~~~~~~~~~~^^^^
TypeError: SiteHolder.reset() takes no arguments (1 given)
Edited by Stéphane De Mita