malariagen / malariagen-data-python

Analyse MalariaGEN data from Python
https://malariagen.github.io/malariagen-data-python/latest/
MIT License
13 stars 23 forks source link

Enabling the use of user-defined cohorts in more analysis #437

Closed jonbrenas closed 9 months ago

jonbrenas commented 10 months ago

It looks like it is not possible to use user-defined cohorts to choose colors or symbols for samples with some functions (e.g., plot_haplotype_clustering). This means providing a color parameter which is a dict mapping custom cohort identifiers onto sample queries. I am going to add this functionality to the plot_haplotype_clustering function but people are welcome to add other functions to the list.

alimanfoo commented 9 months ago

Hi @jonbrenas, the plot_njt() and plot_pca_coords() functions also now support this, I've factored out a common function to allow handling of custom cohorts when deciding symbols and colors for samples. I'm going to close here for now but feel free to reopen if there's another function should get the same treatment.