You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plot_frequencies_heatmap is in snp_frq.py when it is used to plot all kinds of frequencies heat maps. It could probably be moved to util.py (if there are parasite functions that want to use a similar function) or anopheles.py.
I'm less comfortable with migrating plot_frequencies_heatmap to util.py or anopheles.py. I'm wary about files like util.py becoming a general purpose catch-all place for all kinds of stuff, like that stereotypical one kitchen drawer! And if we're talking about moving stuff out of anopheles.py, which sounds like a pretty high-level place, something seems wrong about moving other stuff into it, especially plotting functions, within the same breath. But I would need to refresh my memory on the scope of those particular modules. In principle, I would go with grouping like-with-like, but you know those sort of decisions can become subjective or aesthetic, rather than perfectly rational.
Where do we usually put functions (e.g. plotting functions) that are used by both parasite and vector? Is it really util.py?
The text was updated successfully, but these errors were encountered:
I see what you mean @leehart and I agree. I don't really think there are many (if any) functions that are used by both parasite and vector. I think a good alternative would be to create a new file, e.g. frq_functions.py, that contains the functions that are shared between hap_frq.py, snp_frq.py and (future) cnv_frq.py. Would that make sense @leehart, @alimanfoo ?
Worth mentioning, #630 (the PR that creates hap_freq.py) moves a lot of functions (but not the plotting functions) that are shared by all 3 _advanced versions of the frequency analyses to util.py. I think that it would make more sense to move them to frq_functions.py as well if we choose to go this way.
I made most of the changes that I wanted ... and realised that they might not be what I wanted.
I think that, instead of a separate test_frq.py containing its tests on general functions, it would be better to have general functions that are used in the various test_*_frq.pys. @alimanfoo says that pytest is a little peculiar about importing test functions so it might not be as simple as I hoped, though. This probably needs more discussion so I'll leave it be for now.
plot_frequencies_heatmap
is in snp_frq.py when it is used to plot all kinds of frequencies heat maps. It could probably be moved to util.py (if there are parasite functions that want to use a similar function) or anopheles.py.This issue replaces the second part of #661.
Here is @leehart comment on this issue from #661:
The text was updated successfully, but these errors were encountered: