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

Better error message for gene_cnv_frequencies() if no cohorts are available for the given sample selection parameters #668

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

jonbrenas
Copy link
Collaborator

@jonbrenas jonbrenas commented Nov 26, 2024

Resolves #667.

It should pass all tests, mostly because there are no CNV frequencies tests yet.

@jonbrenas jonbrenas marked this pull request as ready for review November 26, 2024 13:21
@alimanfoo alimanfoo changed the title Better error message for missing (or too few) CNVs for all cohorts Better error message for gene_cnv_frequencies() if no cohorts are available for the given sample selection parameters Nov 26, 2024
Copy link
Member

@alimanfoo alimanfoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jonbrenas, happy to merge this now, assuming there will be some refactoring later via #665 to bring handling of these errors in all frequencies functions into a single location.

@alimanfoo alimanfoo merged commit 21988d4 into master Nov 26, 2024
10 checks passed
@alimanfoo alimanfoo deleted the 667-Handle-no-cohorts-CNV-better branch November 26, 2024 22:28
jonbrenas added a commit that referenced this pull request Nov 27, 2024
@alimanfoo alimanfoo added the BMGF-068808 Work supported by BMGF grant INV-068808 (MalariaGEN 2024-2027). label Dec 4, 2024
alimanfoo added a commit that referenced this pull request Dec 4, 2024
* Moving cnv frequencies functions to their own file

* Changes that should help with legacy tests

* Stuck on creating tests.

* Adding some tests for CNV freqs

* Made the same change as in #668

* Added check_type

* Added a test for max_coverage_variance in the advanced version

* Added a test for max_coverage_variance for the normal version

* Update malariagen_data/anoph/cnv_frq.py

Co-authored-by: Alistair Miles <alimanfoo@googlemail.com>

* Removes the old functions in anopheles.py

* Linting

* Updated some legacy tests

* Updated doc, I think

* Added more tests and a nobs_mode parameter

* Apply suggestions from code review

* Finished the merge

* Removed an unused function in test_ag3.py

---------

Co-authored-by: Alistair Miles <alimanfoo@googlemail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BMGF-068808 Work supported by BMGF grant INV-068808 (MalariaGEN 2024-2027).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gene_cnv_frequencies can return ValueError
2 participants