Skip to content

Add simulated-data tests for karyotype#991

Open
ritoban23 wants to merge 1 commit intomalariagen:masterfrom
ritoban23:GH700-karyotype-simulated-tests
Open

Add simulated-data tests for karyotype#991
ritoban23 wants to merge 1 commit intomalariagen:masterfrom
ritoban23:GH700-karyotype-simulated-tests

Conversation

@ritoban23
Copy link
Copy Markdown
Contributor

Add simulated-data tests for karyotype (#700)

closes #700

Part of #689

What changed

  • malariagen_data/anoph/karyotype.py - load_inversion_tags now accepts
    an 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 -Ag3Simulator gains init_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 Ag
    inversions (2La, 2Rb, 2Rc_col, 2Rc_gam, 2Rd, 2Rj, 2Ru):

    • test_load_inversion_tags — checks the returned DataFrame shape/columns/values
    • test_load_inversion_tags_not_implemented — asserts NotImplementedError when no path is set
    • test_karyotype — checks output DataFrame across multiple sample_sets values
    • test_karyotype_with_sample_query — checks filtering via sample_query

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.

Add tests on simulated data for karyotype

1 participant