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

QC for EarlyWolfAdmixture_6F14 (CanFam) #1643 #1644

Merged

Conversation

gregorgorjanc
Copy link
Contributor

This PR addresses #1643

I followed the process described in https://popsim-consortium.github.io/stdpopsim-docs/stable/development.html#implementing-tests-for-the-review-of-a-demographic-model

My model development is very similar to the initial implementation in #1632 since the model is quite straightforward to implement based on the publication - as part of the QC I read the paper and supplements to check the parameters and made extensive comments in the QC code.

Tests related to this QC pass on my end (but others fail or warn). Let's see what GitHub actions throw back at me;)

> python3 -m pytest
========================================================================= test session starts =========================================================================
platform darwin -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/ggorjanc/Storages/GitBox/popsim/stdpopsim/stdpopsim_fork
configfile: setup.cfg
testpaths: tests
plugins: xdist-3.6.1
4 workers [2545 items]  
............................................................................................................................................................... [  6%]
............................................................................................................................................................... [ 12%]
............................................................................................................................................................... [ 18%]
............................................................................................................................................................... [ 24%]
............................................................................................................................................................... [ 31%]
............................................................................................................................................................... [ 37%]
............................................................................................................................................................... [ 43%]
............................................................................................................................................................... [ 49%]
............................................................................................................................................................... [ 56%]
............................................................................................................................................................... [ 62%]
............................................................................................................................................................... [ 68%]
............................................................................................................................................................... [ 74%]
............................................................................................................................................................... [ 81%]
............................................................................................................................................................... [ 87%]
............................................................................................................................................................... [ 93%]
................................................................................................................s.............................................. [ 99%]
.                                                                                                                                                               [100%]
========================================================================== warnings summary ===========================================================================
tests/test_HomSap.py::TestGenome::test_recombination_rates[Y]
  /Users/ggorjanc/Storages/GitBox/popsim/stdpopsim/stdpopsim_fork/stdpopsim/genetic_maps.py:113: UserWarning: Genetic map not found for chromosome: 'Y' on map: 'HapMapII_GRCh38', substituting a flat map with chromosome recombination rate 0.0
    warnings.warn(

tests/test_HomSap.py::TestGenome::test_recombination_rates[MT]
  /Users/ggorjanc/Storages/GitBox/popsim/stdpopsim/stdpopsim_fork/stdpopsim/genetic_maps.py:113: UserWarning: Genetic map not found for chromosome: 'MT' on map: 'HapMapII_GRCh38', substituting a flat map with chromosome recombination rate 0.0
    warnings.warn(

tests/test_annotations.py: 2 warnings
tests/test_cache.py: 4 warnings
tests/test_genetic_maps.py: 4 warnings
tests/test_utils.py: 1 warning
  /Users/ggorjanc/Storages/GitBox/popsim/stdpopsim/stdpopsim_fork/stdpopsim/utils.py:136: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
    tf.extractall()

tests/test_slim_engine.py: 12 warnings
  /Users/ggorjanc/Storages/GitBox/popsim/stdpopsim/stdpopsim_fork/stdpopsim/genomes.py:426: DeprecatedFeatureWarning: The 'length_multiplier' option is deprecated and will be removed in a future release. Use 'left' and 'right' instead.
    warnings.warn(

tests/test_genetic_maps.py::TestGeneticMapTarball::test_no_args
  /Users/ggorjanc/Storages/GitBox/popsim/stdpopsim/stdpopsim_fork/tests/test_genetic_maps.py:122: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
    tar_file.extractall()

tests/test_utils.py::TestGammaPdf::test_gamma_pdf[x3-a3-loc3-scale3]
  /Users/ggorjanc/Storages/GitBox/popsim/stdpopsim/stdpopsim_fork/stdpopsim/utils.py:348: RuntimeWarning: invalid value encountered in divide
    y = (x - loc) / scale

tests/test_utils.py::TestGammaPdf::test_gamma_pdf[x3-a3-loc3-scale3]
  /opt/homebrew/Caskroom/miniconda/base/envs/popsim/lib/python3.12/site-packages/scipy/stats/_distn_infrastructure.py:2027: RuntimeWarning: invalid value encountered in divide
    x = np.asarray((x - loc)/scale, dtype=dtyp)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= 2544 passed, 1 skipped, 28 warnings in 63.21s (0:01:03) =======================================================

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.84%. Comparing base (aed3734) to head (a3777b5).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1644   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files         132      133    +1     
  Lines        4496     4558   +62     
  Branches      473      473           
=======================================
+ Hits         4489     4551   +62     
  Misses          3        3           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@petrelharp
Copy link
Contributor

Awesome! Looks good! And thanks for fixing that thing in the changelog.

@petrelharp petrelharp merged commit a344665 into popsim-consortium:main Jan 7, 2025
11 checks passed
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.

2 participants