Skip to content

Conversation

benjeffery
Copy link
Member

Getting this error on Ci since msprime 1.0.0:

FAILED tests/test_tree_stats.py::TestSiteTajimasD::test_wright_fisher_simplified
E           AssertionError: 
E           Not equal to tolerance rtol=1e-07, atol=1e-06
E           
E           x and y nan location mismatch:
E            x: array([[nan, nan, nan, nan]])
E            y: array([[ nan,  nan,  nan, -inf]])

../../.local/lib/python3.7/site-packages/numpy/testing/_private/utils.py:746: AssertionError

Hopefully using the tskit jukes cantor fixes this.

@benjeffery
Copy link
Member Author

I'm merging this now to get things moving, but perhaps @hyanwong or @petrelharp could sanity check my params.

@hyanwong
Copy link
Member

Looks fine to me, especially as this is just for the test case. I was slightly thrown by the fact that you are using 5 "loci" in the WF model (i.e. 4 discrete recombination points) but 10 loci for the mutations, but I guess it doesn't really matter.

@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #1330 (0f18da6) into main (4ecb8cb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1330   +/-   ##
=======================================
  Coverage   93.84%   93.84%           
=======================================
  Files          26       26           
  Lines       22273    22273           
  Branches     1029     1029           
=======================================
  Hits        20902    20902           
  Misses       1339     1339           
  Partials       32       32           
Flag Coverage Δ
c-tests 92.44% <ø> (ø)
lwt-tests 92.97% <ø> (ø)
python-c-tests 95.18% <ø> (ø)
python-tests 98.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ecb8cb...0f18da6. Read the comment docs.

@benjeffery benjeffery merged commit a09fefd into tskit-dev:main Apr 26, 2021
@benjeffery benjeffery deleted the fix_stat_test branch April 26, 2021 12:16
@jeromekelleher
Copy link
Member

The difference is technically a bug in the test suite - we can return -inf, nan or +inf from Tajima's D, depending. Our test version of the stat isn't catching this. I hit the same issue here: https://github.com/pystatgen/sgkit/pull/542

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

Successfully merging this pull request may close these issues.

3 participants