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

Bug: SAM legend and plot colors can be reversed, depending on how filters are added #218

Closed
danicahelb opened this issue May 12, 2023 · 6 comments · Fixed by #217
Closed
Labels
bug Something isn't working

Comments

@danicahelb
Copy link
Contributor

Looking at the WWARN data on SAM...

I first filtered Genotype or haplotype assessed = pfcrt k76 to look at the wildtype. I got this plot, which looks good:
image

I then went back to change my filters for Genotype or haplotype assessed and added pfcrt 76t so that i could compare the wildtype to the mutant. I got this plot, which had the colors of the legend and the plot switched:
image

I then cleared all filters and re-added filters for Genotype or haplotype assessed ...this time filtering both pfcrt k76 and pfcrt 76t at the SAME time. I got this plot, which once again has the colors correct:
image

Please make sure the legend colors match to the appropriate line in the graph, regardless of how the filters are ordered, thanks!

@danicahelb danicahelb added the bug Something isn't working label May 12, 2023
@dmfalke dmfalke transferred this issue from VEuPathDB/EdaNewIssues May 13, 2023
@dmfalke
Copy link
Member

dmfalke commented May 13, 2023

The issue is that the legend is ordered by subset count, while the variable’s vocabulary is ordered by filter configuration.

A solution is to augment the overlay variable such that its vocab is in the same order as the legend. I’m not yet sure where to do this. More investigation is needed.

@bobular
Copy link
Member

bobular commented May 15, 2023

I think this may be fixed by #217
I can't reproduce with SCORE S. mansoni but will double check with WWARN...

@bobular
Copy link
Member

bobular commented May 15, 2023

Confirmed. Lineplot trace labelling is correct in sam-floater-overlay-order no matter which order the genotypes are filtered in.

image

@dmfalke
Copy link
Member

dmfalke commented May 15, 2023

I may have found a hack solution that involves modifying the filters array passed to the active plot. The array is modified such that the order of values is the same as the legend items produced by the useMarkers hook. I wasn’t able to test, as my internet went out last night. I’ll test in a little bit.

@chowington
Copy link
Member

This issue wasn't automatically closed by merging the above PR, but maybe it should have been?

@bobular
Copy link
Member

bobular commented May 25, 2023

This issue wasn't automatically closed by merging the above PR, but maybe it should have been?

Yes, thanks, will do!

@bobular bobular closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants