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

Moving things around: cnv_frequencies is treated differently from snp_frequencies and hap_frequencies, and plot_frequencies_heatmap is not in a good place #661

Open
jonbrenas opened this issue Nov 22, 2024 · 3 comments
Assignees

Comments

@jonbrenas
Copy link
Collaborator

While snp_frequencies and hap_frequencies each have their own file while cnv_frequencies is stuck in anopheles.py. It would probably make more sense to give it its own file as well.

On the other hand, 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.

@jonbrenas jonbrenas changed the title Moving things around: cnv_frequencies is treated differently from snp_frequencies and hap_frequencies and plot_frequencies_heatmap is not in a good place Moving things around: cnv_frequencies is treated differently from snp_frequencies and hap_frequencies, and plot_frequencies_heatmap is not in a good place Nov 22, 2024
@leehart
Copy link
Collaborator

leehart commented Nov 25, 2024

Thanks @jonbrenas . We should probably split these into two separate issues, partly because I expect the two proposals might have different implications.

I can certainly see the benefits to consistency putting cnv_frequencies into its own file. I'm not sure why that is currently different, but I guess it just hasn't been been moved over yet. I can't imagine a technical reason, yet. Maybe @alimanfoo has some knowledge of this?

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?

@jonbrenas
Copy link
Collaborator Author

I am closing this issue to be replaced by 2 new ones as advised by @leehart .

@leehart leehart closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
@leehart
Copy link
Collaborator

leehart commented Jan 31, 2025

Reopening as a parent issue rather than unplanned.

@leehart leehart reopened this Jan 31, 2025
@leehart leehart removed question Further information is requested triage labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants