heatmaply
heatmaply copied to clipboard
Add option suppress_default_hovertext for plot_method = "ggplot"
closes #300
@alanocallaghan at least with v1.5, when using custom_hovertext with the plot_method = plotly method the default is not shown.
What I mean is that the behavior should be equivalent
This currently fails with:
heatmaply(mtcars, suppress_default_hovertext=TRUE)
Error in ggplot_heatmap(data_mat, row_text_angle, column_text_angle, scale_fill_gradient_fun, :
object 'suppress_default_hovertext' not found
If I add the arg to ggplot_heatmap, I get:
heatmaply(mtcars, suppress_default_hovertext=TRUE)
Error in `.data$text`:
! Column `text` not found in `.data`.
Run `rlang::last_trace()` to see where the error occurred.
Also hovertext is currently broken generally for plot_method="plotly" so I'd want to resolve that before merging
Thanks @alanocallaghan. I added the arg to my fork and it works for me if I install heatmaply from it. Could there be other changes after merging?
Please also add yourself as contributor to the DESCRIPTION file.
T
On Sun, 24 Dec 2023, 20:07 mcsimenc, @.***> wrote:
Thanks @alanocallaghan https://github.com/alanocallaghan. I added the arg to my fork and it works for me if I install heatmaply from it. Could there be other changes after merging?
— Reply to this email directly, view it on GitHub https://github.com/talgalili/heatmaply/pull/301#issuecomment-1868569475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHOJBVPA2J5GWVFFYSLPXTYLBVNNAVCNFSM6AAAAABBALV3YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGU3DSNBXGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi @mcsimenc Could you please finish addressing the changes @alanocallaghan requested? I'd be happy to merge and close this, thanks.
Hey guys, I'm so sorry about the lag. I've been so busy with work and home life and haven't returned to this. They are simple changes and I will try to get to it this weekend!
No worries, we all get it :) Thanks 👍🙏
On Mon, 20 May 2024, 22:13 mcsimenc, @.***> wrote:
Hey guys, I'm so sorry about the lag. I've been so busy with work and home life and haven't returned to this. They are simple changes and I will try to get to it soon!
— Reply to this email directly, view it on GitHub https://github.com/talgalili/heatmaply/pull/301#issuecomment-2121217396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHOJBR2AB52W7DTT4WW7QTZDJRN7AVCNFSM6AAAAABBALV3YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRGIYTOMZZGY . You are receiving this because you commented.Message ID: @.***>
Hi @mcsimenc - any update on this? (I'd be happy for you to finish this so I'd include it in the next release)
T
Hi Tal and Alan, thanks for your patience. I made the changes and am able to run
heatmaply(mtcars, suppress_default_hovertext=TRUE)
I'll be available over the next two weeks if any other changes need to be made.
Hi @mcsimenc I've reviewed your commit, and made some small comments. One is critical since it breaks the code (in the DESCRIPTION file) The other two are stylistic, please take a look.
Thanks!
p.s.: FYI that once you finish I'll squash your commits into a single one, so no worries on making many commits.
Got it. I may have misunderstood Alan's comment about inverting the true/false. I switched it to use the negation and made the other changes.
Thank you Tal
I removed an extra paren in the DESCRIPTION file that caused R-CMD-check to fail
Great, I'm running the tests again.
@mcsimenc
It's almost there, but there is still an error. Could you please fix the roxygen2 doc so that the rds is properly set?
Here is one of the errors:
colors(256) else colors, na.value = na.value, limits =
limits), grid_color = NA, grid_gap = 0, srtRow = NULL,
srtCol = NULL, xlab = "", ylab = "", main = "", titleX
= TRUE, titleY = TRUE, hide_colorbar = FALSE,
key.title = NULL, return_ppxpy = FALSE, draw_cellnote
= FALSE, cellnote_color = "auto",
cellnote_textposition = "middle right", cellnote_size
= 12, row_side_colors = x[["row_side_colors"]],
row_side_palette = NULL, col_side_colors =
x[["col_side_colors"]], col_side_palette = NULL,
plot_method = c("ggplot", "plotly"), ColSideColors =
NULL, RowSideColors = NULL, heatmap_layers = NULL,
side_color_layers = NULL, dendrogram_layers = NULL,
branches_lwd = 0.6, label_names = c("row", "column",
"value"), fontsize_row = 10, fontsize_col = 10,
subplot_widths = NULL, subplot_heights = NULL,
colorbar_xanchor = if (row_dend_left) "right" else
"left", colorbar_yanchor = "bottom", colorbar_xpos =
if (row_dend_left) -0.1 else 1.1, colorbar_ypos = 0,
colorbar_len = 0.3, colorbar_thickness = 30,
showticklabels = c(TRUE, TRUE), dynamicTicks = FALSE,
node_type = c("scatter", "heatmap"), grid_size = 0.1,
point_size_mat = x[["matrix"]][["point_size_mat"]],
point_size_name = "Point size", label_format_fun =
function(...) format(..., digits = 4),
custom_hovertext =
x[["matrix"]][["custom_hovertext"]],
suppress_default_hovertext = FALSE, dend_hoverinfo =
TRUE, side_color_colorbar_len = 0.3, plotly_source =
"A", height = NULL, width = NULL)
Docs: function(x, colors = viridis(n = 256, alpha = 1, begin = 0, end
= 1, option = "viridis"), limits = NULL, na.value =
"grey50", row_text_angle = 0, column_text_angle = 45,
subplot_margin = 0, row_dend_left = FALSE, margins =
c(NA, NA, NA, NA), ..., scale_fill_gradient_fun =
scale_fill_gradientn(colors = if (is.function(colors))
colors(256) else colors, na.value = na.value, limits =
limits), grid_color = NA, grid_gap = 0, srtRow = NULL,
srtCol = NULL, xlab = "", ylab = "", main = "", titleX
= TRUE, titleY = TRUE, hide_colorbar = FALSE,
key.title = NULL, return_ppxpy = FALSE, draw_cellnote
= FALSE, cellnote_color = "auto",
cellnote_textposition = "middle right", cellnote_size
= 12, row_side_colors = x[["row_side_colors"]],
row_side_palette = NULL, col_side_colors =
x[["col_side_colors"]], col_side_palette = NULL,
plot_method = c("ggplot", "plotly"), ColSideColors =
NULL, RowSideColors = NULL, heatmap_layers = NULL,
side_color_layers = NULL, dendrogram_layers = NULL,
branches_lwd = 0.6, label_names = c("row", "column",
"value"), fontsize_row = 10, fontsize_col = 10,
subplot_widths = NULL, subplot_heights = NULL,
colorbar_xanchor = if (row_dend_left) "right" else
"left", colorbar_yanchor = "bottom", colorbar_xpos =
if (row_dend_left) -0.1 else 1.1, colorbar_ypos = 0,
colorbar_len = 0.3, colorbar_thickness = 30,
showticklabels = c(TRUE, TRUE), dynamicTicks = FALSE,
node_type = c("scatter", "heatmap"), grid_size = 0.1,
point_size_mat = x[["matrix"]][["point_size_mat"]],
point_size_name = "Point size", label_format_fun =
function(...) format(..., digits = 4),
custom_hovertext =
x[["matrix"]][["custom_hovertext"]], dend_hoverinfo =
TRUE, side_color_colorbar_len = 0.3, plotly_source =
"A", height = NULL, width = NULL)
Argument names in code not in docs:
suppress_default_hovertext
Mismatches in argument names (first 3):
Position: 58 Code: suppress_default_hovertext Docs: dend_hoverinfo
Position: 59 Code: dend_hoverinfo Docs: side_color_colorbar_len
Position: 60 Code: side_color_colorbar_len Docs: plotly_source
❯ checking Rd \usage sections ... WARNING
Documented arguments not in \usage in Rd file 'heatmaply.Rd':
‘suppress_default_hovertext’
Ok, @param added.
Hi @mcsimenc
I see there is still an issue with the rd file. Could you please resolve it? Here is the message:
❯ checking for code/documentation mismatches ... WARNING
Codoc mismatches from Rd file 'heatmaply.Rd':
heatmaply.default
Code: function(x, colors = viridis(n = 256, alpha = 1, begin = 0, end
= 1, option = "viridis"), limits = NULL, na.value =
"grey50", row_text_angle = 0, column_text_angle = 45,
subplot_margin = 0, cellnote = NULL, draw_cellnote =
!is.null(cellnote), cellnote_color = "auto",
cellnote_textposition = "middle right", cellnote_size
= 12, Rowv = NULL, Colv = NULL, distfun = stats::dist,
hclustfun = stats::hclust, dist_method = NULL,
hclust_method = NULL, distfun_row = distfun,
hclustfun_row = hclustfun, distfun_col = distfun,
hclustfun_col = hclustfun, dendrogram = c("both",
"row", "column", "none"), show_dendrogram = c(TRUE,
TRUE), reorderfun = function(d, w) reorder(d, w),
k_row = 1, k_col = 1, symm = FALSE, revC = symm ||
(is.dendrogram(Colv) & is.dendrogram(Rowv) &
identical(Rowv, rev(Colv))), scale = c("none", "row",
"column"), na.rm = TRUE, row_dend_left = FALSE,
margins = c(NA, NA, NA, NA), ...,
scale_fill_gradient_fun = NULL, grid_color = NA,
grid_gap = 0, srtRow = NULL, srtCol = NULL, xlab = "",
ylab = "", main = "", titleX = TRUE, titleY = TRUE,
hide_colorbar = FALSE, key.title = NULL, return_ppxpy
= FALSE, row_side_colors = NULL, row_side_palette =
NULL, col_side_colors = NULL, col_side_palette = NULL,
ColSideColors = NULL, RowSideColors = NULL, seriate =
c("OLO", "mean", "none", "GW"), heatmap_layers = NULL,
side_color_layers = NULL, dendrogram_layers = NULL,
branches_lwd = 0.6, file = NULL, width = NULL, height
x[["matrix"]][["custom_hovertext"]],
suppress_default_hovertext = FALSE, dend_hoverinfo =
TRUE, side_color_colorbar_len = 0.3, plotly_source =
"A", height = NULL, width = NULL)
Docs: function(x, colors = viridis(n = 256, alpha = 1, begin = 0, end
= 1, option = "viridis"), limits = NULL, na.value =
"grey50", row_text_angle = 0, column_text_angle = 45,
subplot_margin = 0, row_dend_left = FALSE, margins =
c(NA, NA, NA, NA), ..., scale_fill_gradient_fun =
scale_fill_gradientn(colors = if (is.function(colors))
colors(256) else colors, na.value = na.value, limits =
limits), grid_color = NA, grid_gap = 0, srtRow = NULL,
srtCol = NULL, xlab = "", ylab = "", main = "", titleX
= TRUE, titleY = TRUE, hide_colorbar = FALSE,
key.title = NULL, return_ppxpy = FALSE, draw_cellnote
= FALSE, cellnote_color = "auto",
cellnote_textposition = "middle right", cellnote_size
= 12, row_side_colors = x[["row_side_colors"]],
row_side_palette = NULL, col_side_colors =
x[["col_side_colors"]], col_side_palette = NULL,
plot_method = c("ggplot", "plotly"), ColSideColors =
NULL, RowSideColors = NULL, heatmap_layers = NULL,
side_color_layers = NULL, dendrogram_layers = NULL,
branches_lwd = 0.6, label_names = c("row", "column",
"value"), fontsize_row = 10, fontsize_col = 10,
subplot_widths = NULL, subplot_heights = NULL,
colorbar_xanchor = if (row_dend_left) "right" else
"left", colorbar_yanchor = "bottom", colorbar_xpos =
if (row_dend_left) -0.1 else 1.1, colorbar_ypos = 0,
colorbar_len = 0.3, colorbar_thickness = 30,
showticklabels = c(TRUE, TRUE), dynamicTicks = FALSE,
node_type = c("scatter", "heatmap"), grid_size = 0.1,
point_size_mat = x[["matrix"]][["point_size_mat"]],
point_size_name = "Point size", label_format_fun =
function(...) format(..., digits = 4),
custom_hovertext =
x[["matrix"]][["custom_hovertext"]], dend_hoverinfo =
TRUE, side_color_colorbar_len = 0.3, plotly_source =
"A", height = NULL, width = NULL)
Argument names in code not in docs:
suppress_default_hovertext
Mismatches in argument names (first 3):
Position: 58 Code: suppress_default_hovertext Docs: dend_hoverinfo
Position: 59 Code: dend_hoverinfo Docs: side_color_colorbar_len
Position: 60 Code: side_color_colorbar_len Docs: plotly_source
❯ checking Rd \usage sections ... WARNING
Documented arguments not in \usage in Rd file 'heatmaply.Rd':
‘suppress_default_hovertext’
Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
Thanks. I'm running checks again.
Ok, Tal, try again!
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 87.50000%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 91.66%. Comparing base (
81bae36
) to head (d7cb596
). Report is 3 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
R/plots.R | 84.61% | 2 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #301 +/- ##
==========================================
- Coverage 91.67% 91.66% -0.02%
==========================================
Files 9 9
Lines 1346 1356 +10
==========================================
+ Hits 1234 1243 +9
- Misses 112 113 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Almost there. One last warning
❯ checking for code/documentation mismatches ... WARNING
Codoc mismatches from Rd file 'heatmapr.Rd':
heatmapr
Code: function(x, Rowv = NULL, Colv = NULL, distfun = dist, hclustfun
= hclust, dist_method = NULL, hclust_method = NULL,
distfun_row = distfun, hclustfun_row = hclustfun,
distfun_col = distfun, hclustfun_col = hclustfun,
dendrogram = c("both", "row", "column", "none"),
show_dendrogram = c(TRUE, TRUE), reorderfun =
function(d, w) reorder(d, w), k_row = 1, k_col = 1,
symm = FALSE, revC = symm || (is.dendrogram(Colv) &
is.dendrogram(Rowv) & identical(Rowv, rev(Colv))),
scale = c("none", "row", "column"), na.rm = TRUE,
labRow = rownames(x), labCol = colnames(x), cexRow =
NULL, cexCol = NULL, digits = 3L, cellnote = NULL,
theme = NULL, colors = "RdYlBu", width = NULL, height
= NULL, xaxis_height = 80, yaxis_width = 120,
xaxis_font_size = NULL, yaxis_font_size = NULL,
brush_color = "#0000FF", show_grid = TRUE,
anim_duration = 500, row_side_colors = NULL,
col_side_colors = NULL, seriate = c("OLO", "mean",
"none", "GW"), point_size_mat = NULL, custom_hovertext
= NULL, ...)
Docs: function(x, Rowv = NULL, Colv = NULL, distfun = dist, hclustfun
= hclust, dist_method = NULL, hclust_method = NULL,
distfun_row = distfun, hclustfun_row = hclustfun,
distfun_col = distfun, hclustfun_col = hclustfun,
dendrogram = c("both", "row", "column", "none"),
show_dendrogram = c(TRUE, TRUE), reorderfun =
function(d, w) reorder(d, w), k_row = 1, k_col = 1,
symm = FALSE, revC = symm || (is.dendrogram(Colv) &
is.dendrogram(Rowv) & identical(Rowv, rev(Colv))),
scale = c("none", "row", "column"), na.rm = TRUE,
labRow = rownames(x), labCol = colnames(x), cexRow =
NULL, cexCol = NULL, digits = 3L, cellnote = NULL,
theme = NULL, colors = "RdYlBu", width = NULL, height
= NULL, xaxis_height = 80, yaxis_width = 120,
xaxis_font_size = NULL, yaxis_font_size = NULL,
brush_color = "#0000FF", show_grid = TRUE,
anim_duration = 500, row_side_colors = NULL,
col_side_colors = NULL, seriate = c("OLO", "mean",
"none", "GW"), point_size_mat = NULL, custom_hovertext
= NULL, suppress_default_hovertext = FALSE, ...)
Argument names in docs not in code:
suppress_default_hovertext
Mismatches in argument names:
Position: 43 Code: ... Docs: suppress_default_hovertext
Make sure the relative location of the roxygen2 param is the same as in the code. And run roxygen2 to include the change.
@mcsimenc I still see the error. Are you still up to trying to resolve it?
2m 0s
theme = NULL, colors = "RdYlBu", width = NULL, height
= NULL, xaxis_height = 80, yaxis_width = 120,
xaxis_font_size = NULL, yaxis_font_size = NULL,
brush_color = "#0000FF", show_grid = TRUE,
anim_duration = 500, row_side_colors = NULL,
col_side_colors = NULL, seriate = c("OLO", "mean",
"none", "GW"), point_size_mat = NULL, custom_hovertext
= NULL, suppress_default_hovertext = FALSE, ...)
Argument names in docs not in code:
suppress_default_hovertext
Mismatches in argument names:
Position: 43 Code: ... Docs: suppress_default_hovertext
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘testthat.R’ [80s/57s]
[80s/57s] OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... [16s/13s] OK
* checking for non-standard things in the check directory ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 WARNING, 3 NOTEs
See
‘/home/runner/work/heatmaply/heatmaply/check/heatmaply.Rcheck/00check.log’
for details.
── R CMD check results ──────────────────────────────────── heatmaply 1.5.0 ────
Duration: 1m 40.8s
❯ checking for code/documentation mismatches ... WARNING
Codoc mismatches from Rd file 'heatmapr.Rd':
heatmapr
Code: function(x, Rowv = NULL, Colv = NULL, distfun = dist, hclustfun
= hclust, dist_method = NULL, hclust_method = NULL,
distfun_row = distfun, hclustfun_row = hclustfun,
distfun_col = distfun, hclustfun_col = hclustfun,
dendrogram = c("both", "row", "column", "none"),
show_dendrogram = c(TRUE, TRUE), reorderfun =
function(d, w) reorder(d, w), k_row = 1, k_col = 1,
symm = FALSE, revC = symm || (is.dendrogram(Colv) &
is.dendrogram(Rowv) & identical(Rowv, rev(Colv))),
scale = c("none", "row", "column"), na.rm = TRUE,
labRow = rownames(x), labCol = colnames(x), cexRow =
NULL, cexCol = NULL, digits = 3L, cellnote = NULL,
theme = NULL, colors = "RdYlBu", width = NULL, height
= NULL, xaxis_height = 80, yaxis_width = 120,
xaxis_font_size = NULL, yaxis_font_size = NULL,
brush_color = "#0000FF", show_grid = TRUE,
anim_duration = 500, row_side_colors = NULL,
col_side_colors = NULL, seriate = c("OLO", "mean",
"none", "GW"), point_size_mat = NULL, custom_hovertext
= NULL, ...)
Docs: function(x, Rowv = NULL, Colv = NULL, distfun = dist, hclustfun
= hclust, dist_method = NULL, hclust_method = NULL,
distfun_row = distfun, hclustfun_row = hclustfun,
distfun_col = distfun, hclustfun_col = hclustfun,
dendrogram = c("both", "row", "column", "none"),
show_dendrogram = c(TRUE, TRUE), reorderfun =
function(d, w) reorder(d, w), k_row = 1, k_col = 1,
symm = FALSE, revC = symm || (is.dendrogram(Colv) &
is.dendrogram(Rowv) & identical(Rowv, rev(Colv))),
scale = c("none", "row", "column"), na.rm = TRUE,
labRow = rownames(x), labCol = colnames(x), cexRow =
NULL, cexCol = NULL, digits = 3L, cellnote = NULL,
theme = NULL, colors = "RdYlBu", width = NULL, height
= NULL, xaxis_height = 80, yaxis_width = 120,
xaxis_font_size = NULL, yaxis_font_size = NULL,
brush_color = "#0000FF", show_grid = TRUE,
anim_duration = 500, row_side_colors = NULL,
col_side_colors = NULL, seriate = c("OLO", "mean",
"none", "GW"), point_size_mat = NULL, custom_hovertext
= NULL, suppress_default_hovertext = FALSE, ...)
Argument names in docs not in code:
suppress_default_hovertext
Mismatches in argument names:
Position: 43 Code: ... Docs: suppress_default_hovertext
Hi Tal, yes trying to resolve it. The params are the same in the docs and the function def, and I ran roxygenise(). Should that do it?
Hi, Did you push your updates? The latest check I ran still doesn't seem to have resolved the issue.
On Tue, 16 Jul 2024, 2:14 mcsimenc, @.***> wrote:
Hi Tal, yes trying to resolve it. The params are the same in the docs and the function def, and I ran roxygenise(). Should that do it?
— Reply to this email directly, view it on GitHub https://github.com/talgalili/heatmaply/pull/301#issuecomment-2229601671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHOJBQGCPGVQMKZDPW6CGTZMRJVRAVCNFSM6AAAAABBALV3YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRZGYYDCNRXGE . You are receiving this because you commented.Message ID: @.***>
No, I didn't, until just now. Thanks Tal
On Tue, Jul 16, 2024 at 1:18 AM Tal Galili @.***> wrote:
Hi, Did you push your updates? The latest check I ran still doesn't seem to have resolved the issue.
On Tue, 16 Jul 2024, 2:14 mcsimenc, @.***> wrote:
Hi Tal, yes trying to resolve it. The params are the same in the docs and the function def, and I ran roxygenise(). Should that do it?
— Reply to this email directly, view it on GitHub https://github.com/talgalili/heatmaply/pull/301#issuecomment-2229601671,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAHOJBQGCPGVQMKZDPW6CGTZMRJVRAVCNFSM6AAAAABBALV3YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRZGYYDCNRXGE>
. You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/talgalili/heatmaply/pull/301#issuecomment-2230299925, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYL2ZT6LX2GA2DYWB5KJBLZMTJOBAVCNFSM6AAAAABBALV3YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZQGI4TSOJSGU . You are receiving this because you were mentioned.Message ID: @.***>
Congrats 👏🎉 It seems to pass! I'm squashing and merging to main :)
Awesome!