Refactor CNV data functions for Anopheles (inc. Af1)#411
Refactor CNV data functions for Anopheles (inc. Af1)#411leehart merged 51 commits intomalariagen:masterfrom leehart:GH404_Af1_CNV_data
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #411 +/- ##
==========================================
+ Coverage 97.07% 97.20% +0.12%
==========================================
Files 24 26 +2
Lines 1673 2072 +399
==========================================
+ Hits 1624 2014 +390
- Misses 49 58 +9 ☔ View full report in Codecov by Sentry. |
|
Need to resolve |
|
Perhaps |
|
Need to resolve the 🤔 |
|
In order to cater for |
|
Another approach or convention, which would be a breaking change, could be to use plural param names when either a string or a list or a tuple are accepted, e.g. |
This is tempting, but I think I'd prefer to avoid API change unless really necessary. |
This seems reasonable to me. |
|
Need to resolve |
SGTM. |
|
It was easier to create a new base_param named |
alimanfoo
left a comment
There was a problem hiding this comment.
Looking great so far :)
A few minor comments...
No objection. Would also then have consistency in type name with the |
…ata. Move single_sample from het_params to base_params.
|
I'm now wondering if it makes sense for cnv_data to be using het_params, or whether it would be better to promote these to base_params (or perhaps gplt_params), like single_sample was. I am also slightly concerned about cnv_params now having a mixed-type y_max and a different y_max_default to het_params, although this avoids changing the API. |
|
As suspected, having a mixed-type for y_max causes type-safety / inconstencey flags, e.g. which would error if a string other than "auto" was used as param 🤔 It also looks like there is a problem re-using the het_params circle_kwargs for cnv_data, e.g. Raising 🤔 There is also an "incompatible types" issue in cnv_data's treatment of base_param Somehow clashing with |
…ck method of AnophelesCnvData
…k method of AnophelesCnvData
…le to .lookup_sample.
|
I gather I need to improve test coverage on |
…ams. Use random good params.
|
Nearly there! |
alimanfoo
left a comment
There was a problem hiding this comment.
Partial review, one small thing I noticed...
alimanfoo
left a comment
There was a problem hiding this comment.
There is a sheep ton of work in here, thanks so much @leehart 🙏🏻
It looks great, I just picked up one thing regarding how the CNV stard and end coordinates are simulated. There should be no dependency between the CNV data and the SNP data, so it would be good to simulate the CNV start and end coordinates independently, according to the different types of CNV calling. Happy to talk through if would help.
|
Ah, I suspected some of this and should have asked! Many thanks @alimanfoo . I'll see what I can do and might need to clarify some things next week. |
alimanfoo
left a comment
There was a problem hiding this comment.
Looks good, feel free to merge after making the suggested changes to simulation of CNV coordinates.
…o plot_cnv_hmm_..._track() in AnophelesCnvData.
…helesCnvData signatures for plot_cnv_hmm_heatmap(), plot_cnv_hmm_heatmap_track().
…endent of SNP data.
Re: #404