-
Notifications
You must be signed in to change notification settings - Fork 606
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
User-defined heatmap value range #1427
Comments
Hi @safay, I think that the plot does have the option to set a hard cutoff, it's just called pconfig = {
'min': None, # Minimum value (default: auto)
'max': None, # Maximum value (default: auto)
} You can overwrite any plot config at run time as follows: https://multiqc.info/docs/#customising-plots
Looking at the code, this is deliberate behaviour. I seem to remember doing that in the early days as it was quite confusing to have the scale / meaning of the colours change each time you filtered.
This sounds great, but would not be trivial to implement. Phil |
ok you made me curious as I agree that the sliders would be a really nice feature. So I started playing and came up with this: Added in 4abbfe5 - if you could please install the Phil |
@ewels Thank you! This is great. Also, thanks for pointing me to the right place in the docs to find parameters for plot configs. |
@ewels This is brilliant. I know beggars can't be choosers, but if it would be trivial to add, a field to enter min/max would be nice. |
Yes I was looking at this again last night before I went to bed and was thinking exactly that - agree that it would be useful (as shown by your screenshot with small useful ranges) and should be easy enough to add. Will have a look 👍🏻 |
ok, added in 26177e9 - please give that a whirl and see how it looks 👍🏻 |
@ewels I tested it today and it's lovely, that works really really well. I am very grateful! |
New feature implemented in |
Brilliant, thanks for the suggestion and prompt! |
Is your feature request related to a problem? Please describe.
Lab users would like to be able to view differences within a variable range of values within a heatmap. For example, when there are some samples with very high values (e.g., 30,000, see attached plot) but for the samples we are particularly interested in we need to distinguish between values within a range of, say, 1-500, the higher value samples burn out the signal. Even if the user hides the samples with high values, the colors of the heatmap do not change.
Describe the solution you'd like
A brute force solution would be to implement a hard cutoff/limit for the heatmap values, something like the "xmax" config for x/y plots. If this exists today I could not find it.
A heavier lift, more UI-based, solution would be to have something like a slider on the sidebar that could dynamically re-render the heatmap for a given range.
Describe alternatives you've considered
See above about using a config setting for heatmaps analogous to xmax for x/y plots.
I've considered rolling my own solution in matplotlib outside MultiQC, but I'm adding this feature request here because it seems like it might be something others might want.
I could add a new part to the analysis pipeline to separate out low-signal samples and create a separate heatmap for those samples.
Additional context
I'm willing to have a stab at making a PR, especially if I can get some guidance.
The text was updated successfully, but these errors were encountered: