-
Notifications
You must be signed in to change notification settings - Fork 7
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
cluster ordering issues #21
Comments
Hello @RvV1979, Thank you for pointing this out, I think this was indeed a bug which happened when the cluster columns have numbers that automatically order unexpectedly. I have pushed a fix up to GitHub to hopefully address this. Please could you re-install the development GitHub version and re-try your original code. Let me know if this works on your subset and your full data. Thanks, Tom |
Thanks for the quick reply and fix. I did some tests and everything seems to work as expected. |
I am using mapmixture on a data set with more than 9 clusters and find there are some issues with cluster ordering and colors. Below is a minimal example illustrating the issues.
However, the resulting structure plot shows something different, namely that site2 is mainly cluster 10 and site3 cluster 11. This is incorrect; see figure below:
When I plot the admixture percentages on a map, the cluster assignments are correct. However, the colors do not match the order in which they are defined (for example, I intended cluster2 to be skyblue but it is gold); see code and figure below:
What I think happens is that the clusters are internally ordered based on their names in a strict (i.e., not natural) sense as can be seen in the legend of the mapmixture plot where clusters 10 and 11 come before 2 and 3. In the mapmixture plot, this means that colors are not applied in the expected order. I believe that same internal ordering happens in the structure plot but for some reason, the cluster names in the legend are in the original order causing the cluster assignments to be incorrect.
Thanks
The text was updated successfully, but these errors were encountered: