Closed PhilippJunk closed 2 years ago
I also ran into this unexpected behavior which took awhile to track down as the original poster mentions. It would be nice to exclude the "HeatmapInfoOutput" in the UI without having to use tricks in ShinyJS.
@PhilippJunk , thank you very much for your analysis. Yes there is a variable which is only set in subHeatmapOutput()
. If subHeatmapOutput()
is not used, that variable will be NULL
, later validation of this variable generates an error.
Now I have fixed this problem. Thanks again!
@jokergoo Thanks for the fix and clarification!
Dear @jokergoo
Thanks for creating such a great tool!
I have been playing around a little bit with InteractiveComplexHeatmap with the aim of building a dashboard. For my application, I am interested in only showing the main heatmap and the sub-heatmap, but not the output component. Trying to specify the UI components separately and including only
originalHeatmapOutput
andsubHeatmapOutput
in a shiny app has lead to some unexpected behavior. Here is a number of minimal examples (tested on Ubuntu 18.04 and Windows 10 with R 4.2):Only specify
originalHeatmapOutput
andsubHeatmapOutput
: not workingRunning this in a fresh R session (important, I will touch upon this later) will not produce a working shiny app, but instead leads to the following output:
Specify all three UI components: working
The identical app, with all three UI components specified, is working as intended:
Even more interestingly, if in the same R session, I first run app2 and then app1, app1 is working perfectly fine (which has lead to quite some confusion from my side, it is always interesting to have code which is working and then suddenly doesn't :D ).
If this behavior is intended, it would be nice to have that explicitly mentioned in the documentation, where to the best of my knowledge it is not mentioned that all three UI components have to be present at all time for the package to work. Additionally, a more descriptive error message if possible would be very helpful.
I have tried some workarounds, with mixed results, maybe this is of interest to someone who will have a similar aim:
Workaround 1: hiding
HeatmapInfoOutput
within ashiny::conditionalPanel
: not workingThis creates a working shiny app, and the main heatmap is plotted, however all click/brush events on the main heatmap appear to be broken and this renders the subheatmap useless.
Workaround 2: hiding
HeatmapInfoOutput
with JavaScript: workingThis seems to be working fine, I suspect because the HTML element actually exists and can be modified, but is not displayed.
Session Info