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

plot_pairwise_average_fst may change the order of the cohorts when using a cohort dict #539

Open jonbrenas opened 1 month ago

jonbrenas commented 1 month ago

When using user defined cohorts using a dictionary, say:

Screenshot 2024-05-24 at 08 40 25

plot_pairwise_average_fst (and I assume some other functions as well) will reorder them so that they are in alphabetical order. This is a problem when, e.g., the annotate_se option is used because the se and fst values are swapped, e.g. using the dictionary from the above example:

Screenshot 2024-05-24 at 08 45 04

Another time when that is a problem is when the user ordered the keys for a good reason.