Add simulated-data tests for karyotype#991
Open
ritoban23 wants to merge 1 commit intomalariagen:masterfrom
Open
Add simulated-data tests for karyotype#991ritoban23 wants to merge 1 commit intomalariagen:masterfrom
ritoban23 wants to merge 1 commit intomalariagen:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add simulated-data tests for karyotype (#700)
closes #700
Part of #689
What changed
malariagen_data/anoph/karyotype.py-load_inversion_tagsnow acceptsan absolute file path in addition to a package-resource filename. This allows
tests to pass a dynamically-generated tag file on disk.
tests/anoph/conftest.py-Ag3Simulatorgainsinit_inversion_tags(),which picks tag SNP positions directly from the simulated SNP data (so they
are guaranteed to exist in the fake genotype data) and writes them to a
temporary CSV. The path is exposed as
ag3_sim_fixture.inversion_tag_path.tests/anoph/test_karyotype.py- 22 tests covering all 7 Aginversions (
2La,2Rb,2Rc_col,2Rc_gam,2Rd,2Rj,2Ru):test_load_inversion_tags— checks the returned DataFrame shape/columns/valuestest_load_inversion_tags_not_implemented— assertsNotImplementedErrorwhen no path is settest_karyotype— checks output DataFrame across multiplesample_setsvaluestest_karyotype_with_sample_query— checks filtering viasample_query