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

Error in train(..., self = self) : unused argument (list(NULL, "column", "row", "text")) #305

Closed
viallonv opened this issue Apr 2, 2024 · 10 comments
Labels

Comments

@viallonv
Copy link

viallonv commented Apr 2, 2024

Describe the bug

I'm getting an error when running the heatmaply function on the toy example, unless I use the plot_method = "plotly"

To Reproduce

heatmaply(mtcars) # produces the error (see title of this bug report)
heatmaply(mtcars, plot_method = "plotly") # works fine

Additional context

Here is my session.Info:
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] grid parallel stats graphics grDevices utils datasets methods base

other attached packages:
[1] heatmaply_1.5.0 viridis_0.6.4 viridisLite_0.4.2 plotly_4.10.2 rsvg_2.5.0 ggvenn_0.1.10
[7] ggforce_0.4.1 xml2_1.3.6 tidygraph_1.2.3 ggraph_2.1.0 corrplot_0.92 RColorBrewer_1.1-3
[13] clusterProfiler_4.8.3 ggrepel_0.9.5 readxl_1.4.3 doParallel_1.0.17 iterators_1.0.14 foreach_1.5.2
[19] DescTools_0.99.50 survival_3.5-7 labelled_2.12.0 Epi_2.47.1 haven_2.5.4 janitor_2.2.0
[25] SomaDataIO_6.0.0 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2
[31] readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.0 tidyverse_2.0.0.9000

loaded via a namespace (and not attached):
[1] shadowtext_0.1.2 fastmatch_1.1-4 systemfonts_1.0.4 plyr_1.8.8 igraph_1.5.1
[6] lazyeval_0.2.2 splines_4.1.2 crosstalk_1.2.0 BiocParallel_1.34.2 GenomeInfoDb_1.36.3
[11] digest_0.6.34 ca_0.71.1 htmltools_0.5.7 yulab.utils_0.1.0 GOSemSim_2.26.1
[16] GO.db_3.17.0 fansi_1.0.6 magrittr_2.0.3 memoise_2.0.1 tzdb_0.4.0
[21] etm_1.1.1 Biostrings_2.68.1 graphlayouts_1.0.1 vroom_1.6.5 svglite_2.1.1
[26] timechange_0.3.0 enrichplot_1.20.3 colorspace_2.1-0 blob_1.2.4 textshaping_0.3.7
[31] crayon_1.5.2 RCurl_1.98-1.12 jsonlite_1.8.8 scatterpie_0.2.1 Exact_3.2
[36] zoo_1.8-12 ape_5.7-1 glue_1.7.0 polyclip_1.10-4 registry_0.5-1
[41] gtable_0.3.4 zlibbioc_1.46.0 XVector_0.40.0 webshot_0.5.5 BiocGenerics_0.46.0
[46] scales_1.3.0 DOSE_3.26.1 mvtnorm_1.2-3 DBI_1.2.2 Rcpp_1.0.11
[51] cmprsk_2.2-11 gridGraphics_0.5-1 tidytree_0.4.5 bit_4.0.5 proxy_0.4-27
[56] stats4_4.1.2 htmlwidgets_1.6.4 httr_1.4.7 fgsea_1.26.0 ellipsis_0.3.2
[61] pkgconfig_2.0.3 farver_2.1.1 utf8_1.2.4 labeling_0.4.3 ggplotify_0.1.2
[66] tidyselect_1.2.0 rlang_1.1.3 reshape2_1.4.4 AnnotationDbi_1.62.2 munsell_0.5.0
[71] cellranger_1.1.0 tools_4.1.2 cachem_1.0.8 downloader_0.4 cli_3.6.2
[76] generics_0.1.3 RSQLite_2.3.5 gson_0.1.0 fastmap_1.1.1 yaml_2.3.8
[81] ragg_1.2.7 ggtree_3.8.2 bit64_4.0.5 fs_1.6.3 dendextend_1.17.1
[86] KEGGREST_1.40.0 rootSolve_1.8.2.4 nlme_3.1-164 aplot_0.2.1 compiler_4.1.2
[91] rstudioapi_0.15.0 png_0.1-8 e1071_1.7-13 treeio_1.24.3 tweenr_2.0.2
[96] stringi_1.8.3 lattice_0.20-45 Matrix_1.4-0 vctrs_0.6.5 pillar_1.9.0
[101] lifecycle_1.0.3 data.table_1.14.8 cowplot_1.1.1 bitops_1.0-7 seriation_1.5.4
[106] lmom_3.0 patchwork_1.1.3 qvalue_2.32.0 R6_2.5.1 TSP_1.2-4
[111] gridExtra_2.3 IRanges_2.34.1 gld_2.6.6 codetools_0.2-19 assertthat_0.2.1
[116] boot_1.3-30 MASS_7.3-60.0.1 withr_2.5.1 S4Vectors_0.38.2 GenomeInfoDbData_1.2.10
[121] mgcv_1.9-1 expm_0.999-7 hms_1.1.3 ggfun_0.1.3 HDO.db_0.99.1
[126] class_7.3-22 snakecase_0.11.1 numDeriv_2016.8-1.1 Biobase_2.60.0

@viallonv viallonv added the bug label Apr 2, 2024
@xxllgg
Copy link

xxllgg commented Apr 26, 2024

Hi, Did you resolved this problem? I'm going through the same thing.

@alanocallaghan
Copy link
Collaborator

Can you post a stack trace/traceback?

@xxllgg
Copy link

xxllgg commented Apr 26, 2024

I'm using heatmaply version 1.5.0

My sessionInfo()
R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8

attached base packages:
[1] grid stats graphics grDevices utils datasets methods base

other attached packages:
[1] ComplexHeatmap_2.14.0 purrr_1.0.2 patchwork_1.2.0
[4] heatmaply_1.5.0 viridis_0.6.4 viridisLite_0.4.2
[7] plotly_4.10.2 ggplot2_3.5.0 magrittr_2.0.3
[10] d3heatmap_0.9.0 vPanG_0.1.0

loaded via a namespace (and not attached):
[1] Rtsne_0.17 colorspace_2.1-0 ggsignif_0.6.4 rjson_0.2.21
[5] ellipsis_0.3.2 rprojroot_2.0.3 circlize_0.4.16 GlobalOptions_0.1.2
[9] base64enc_0.1-3 ggdendro_0.2.0 fs_1.6.3 clue_0.3-65
[13] rstudioapi_0.15.0 farver_2.1.1 remotes_2.4.2.1 ggrepel_0.9.5
[17] fansi_1.0.4 codetools_0.2-19 doParallel_1.0.17 cachem_1.0.8
[21] knitr_1.44 pkgload_1.3.2.1 jsonlite_1.8.7 cluster_2.1.4
[25] png_0.1-8 snowfall_1.84-6.3 shiny_1.8.0 readr_2.1.4
[29] compiler_4.2.3 httr_1.4.7 assertthat_0.2.1 fastmap_1.1.1
[33] lazyeval_0.2.2 cli_3.6.1 later_1.3.1 htmltools_0.5.6
[37] prettyunits_1.1.1 tools_4.2.3 gtable_0.3.4 glue_1.6.2
[41] reshape2_1.4.4 dplyr_1.1.4 V8_4.3.3 Rcpp_1.0.11
[45] vctrs_0.6.5 iterators_1.0.14 crosstalk_1.2.0 xfun_0.40
[49] stringr_1.5.0 ps_1.7.5 mime_0.12 miniUI_0.1.1.1
[53] lifecycle_1.0.3 devtools_2.4.5 dendextend_1.17.1 ca_0.71.1
[57] MASS_7.3-60 scales_1.3.0 TSP_1.2-4 hms_1.1.3
[61] promises_1.2.1 parallel_4.2.3 RColorBrewer_1.1-3 yaml_2.3.7
[65] curl_5.0.2 memoise_2.0.1 gridExtra_2.3 stringi_1.7.12
[69] randomcoloR_1.1.0.1 S4Vectors_0.36.2 desc_1.4.2 foreach_1.5.2
[73] seriation_1.5.5 BiocGenerics_0.44.0 pkgbuild_1.4.2 shape_1.4.6.1
[77] rlang_1.1.1 pkgconfig_2.0.3 matrixStats_1.3.0 evaluate_0.21
[81] htmlwidgets_1.6.2 labeling_0.4.3 processx_3.8.2 tidyselect_1.2.0
[85] plyr_1.8.8 R6_2.5.1 IRanges_2.32.0 snow_0.4-4
[89] generics_0.1.3 profvis_0.3.8 pillar_1.9.0 withr_2.5.0
[93] tibble_3.2.1 crayon_1.5.2 utf8_1.2.3 rmarkdown_2.25
[97] tzdb_0.4.0 urlchecker_1.0.1 GetoptLong_1.0.5 usethis_2.2.2
[101] data.table_1.14.8 callr_3.7.3 digest_0.6.33 webshot_0.5.5
[105] xtable_1.8-4 tidyr_1.3.0 httpuv_1.6.14 stats4_4.2.3
[109] munsell_0.5.0 registry_0.5-1 sessioninfo_1.2.2

heatmaply(mtcars, k_row = 3, k_col = 2) # failure
Error in train(..., self = self) :
unused argument (list(NULL, "column", "row", "text"))
heatmaply(mtcars, k_row = 3, k_col = 2, plot_method = "plotly") # successfully

@alanocallaghan
Copy link
Collaborator

That is not a stack trace or traceback. Please post the output of traceback(), rlang::last_error or similar

@xxllgg
Copy link

xxllgg commented Apr 26, 2024

traceback()
11: guides$train(scales, theme$legend.direction, plot$labels)
10: get_gdefs_ggproto(npscales$scales, theme, plot, layers)
9: gg2list(p, width = width, height = height, tooltip = tooltip, 
       dynamicTicks = dynamicTicks, layerData = layerData, originalData = originalData, 
       source = source, ...)
8: ggplotly.ggplot(p, dynamicTicks = dynamicTicks, tooltip = "text", 
       height = height, width = width, source = plotly_source)
7: ggplotly(p, dynamicTicks = dynamicTicks, tooltip = "text", height = height, 
       width = width, source = plotly_source)
6: layout(., showlegend = FALSE)
5: ggplotly(p, dynamicTicks = dynamicTicks, tooltip = "text", height = height, 
       width = width, source = plotly_source) %>% layout(showlegend = FALSE)
4: heatmaply.heatmapr(hm, colors = colors, limits = limits, scale_fill_gradient_fun = scale_fill_gradient_fun, 
       grid_color = grid_color, grid_gap = grid_gap, row_text_angle = row_text_angle, 
       column_text_angle = column_text_angle, subplot_margin = subplot_margin, 
       row_dend_left = row_dend_left, xlab = xlab, ylab = ylab, 
       main = main, titleX = titleX, titleY = titleY, hide_colorbar = hide_colorbar, 
       key.title = key.title, return_ppxpy = return_ppxpy, margins = margins, 
       row_side_palette = row_side_palette, col_side_palette = col_side_palette, 
       heatmap_layers = heatmap_layers, side_color_layers = side_color_layers, 
       dendrogram_layers = dendrogram_layers, ColSideColors = ColSideColors, 
       RowSideColors = RowSideColors, branches_lwd = branches_lwd, 
       label_names = label_names, plot_method = plot_method, draw_cellnote = draw_cellnote, 
       cellnote_textposition = cellnote_textposition, cellnote_size = cellnote_size, 
       cellnote_color = cellnote_color, fontsize_row = fontsize_row, 
       fontsize_col = fontsize_col, subplot_widths = subplot_widths, 
       subplot_heights = subplot_heights, colorbar_len = colorbar_len, 
       colorbar_thickness = colorbar_thickness, colorbar_xanchor = colorbar_xanchor, 
       colorbar_yanchor = colorbar_yanchor, colorbar_xpos = colorbar_xpos, 
       colorbar_ypos = colorbar_ypos, showticklabels = showticklabels, 
       dynamicTicks = dynamicTicks, grid_size = grid_size, node_type = node_type, 
       point_size_name = point_size_name, label_format_fun = label_format_fun, 
    ...
3: heatmaply(hm, colors = colors, limits = limits, scale_fill_gradient_fun = scale_fill_gradient_fun, 
       grid_color = grid_color, grid_gap = grid_gap, row_text_angle = row_text_angle, 
       column_text_angle = column_text_angle, subplot_margin = subplot_margin, 
       row_dend_left = row_dend_left, xlab = xlab, ylab = ylab, 
       main = main, titleX = titleX, titleY = titleY, hide_colorbar = hide_colorbar, 
       key.title = key.title, return_ppxpy = return_ppxpy, margins = margins, 
       row_side_palette = row_side_palette, col_side_palette = col_side_palette, 
       heatmap_layers = heatmap_layers, side_color_layers = side_color_layers, 
       dendrogram_layers = dendrogram_layers, ColSideColors = ColSideColors, 
       RowSideColors = RowSideColors, branches_lwd = branches_lwd, 
       label_names = label_names, plot_method = plot_method, draw_cellnote = draw_cellnote, 
       cellnote_textposition = cellnote_textposition, cellnote_size = cellnote_size, 
       cellnote_color = cellnote_color, fontsize_row = fontsize_row, 
       fontsize_col = fontsize_col, subplot_widths = subplot_widths, 
       subplot_heights = subplot_heights, colorbar_len = colorbar_len, 
       colorbar_thickness = colorbar_thickness, colorbar_xanchor = colorbar_xanchor, 
       colorbar_yanchor = colorbar_yanchor, colorbar_xpos = colorbar_xpos, 
       colorbar_ypos = colorbar_ypos, showticklabels = showticklabels, 
       dynamicTicks = dynamicTicks, grid_size = grid_size, node_type = node_type, 
       point_size_name = point_size_name, label_format_fun = label_format_fun, 
    ...
2: heatmaply.default(mtcars, k_row = 3, k_col = 2)
1: heatmaply(mtcars, k_row = 3, k_col = 2)

rlang::last_error()
Error: Can't show last error because no error was recorded yet

@alanocallaghan
Copy link
Collaborator

Are you sure that's the full output of traceback? It doesn't seem to match the previous error you posted

@xxllgg
Copy link

xxllgg commented Apr 26, 2024

I restart the Rstudio. It is the full output of traceback().

@alanocallaghan
Copy link
Collaborator

Can't reproduce the error on my end, only suggestion I have for now is to update plotly, I'm running 4.10.4 to your 4.10.2

@xxllgg
Copy link

xxllgg commented Apr 26, 2024

I reinstalled plotly. Now it's running successfully. Thank you!

@alanocallaghan
Copy link
Collaborator

Great cheers, sorry for the delay looking at this, just missed the first notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants