You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
genetic_relatedness thinks it needs 2 samples sets but is valid with only one #3055
Self-comparisons are valid for this statistic, and so this should work:
>> ts.genetic_relatedness([[0]], indexes=[(0,0)])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/peter/projects/tskit-dev/tsvenv/lib/python3.12/site-packages/tskit/trees.py", line 8403, in genetic_relatedness
out = self.__k_way_sample_set_stat(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peter/projects/tskit-dev/tsvenv/lib/python3.12/site-packages/tskit/trees.py", line 7843, in __k_way_sample_set_stat
stat = self.__run_windowed_stat(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peter/projects/tskit-dev/tsvenv/lib/python3.12/site-packages/tskit/trees.py", line 7664, in __run_windowed_stat
stat = method(*args, **kwargs, windows=windows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tskit.LibraryError: Insufficient sample sets provided. (TSK_ERR_INSUFFICIENT_SAMPLE_SETS)
Activity
Fix: genetic_relatedness to allow single sample set with self-compari…
andrewkern commentedon Jun 26, 2025
I've tried to fix this over in #3235
Fix: genetic_relatedness to allow single sample set with self-compari…
Fix: genetic_relatedness to allow single sample set with self-compari…
Fix: genetic_relatedness to allow single sample set with self-compari…
Fix: genetic_relatedness to allow single sample set with self-compari…