Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genetic_relatedness thinks it needs 2 samples sets but is valid with only one #3055

Open
petrelharp opened this issue Nov 14, 2024 · 0 comments

Comments

@petrelharp
Copy link
Contributor

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant