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] Grouping is wrong with certain sample names #127

Open
mschubert opened this issue Apr 30, 2024 · 3 comments
Open

[BUG] Grouping is wrong with certain sample names #127

mschubert opened this issue Apr 30, 2024 · 3 comments

Comments

@mschubert
Copy link

Warning

This is likely a bug where tidyHeatmap produces the wrong results without an error

I've got a simple data.frame with the fields id (sample id), set (gene set), value (score) and group (group):

ds = data.frame(id = c("12.10-r1", "12.10-r2", "12.10_17w-r1", "12.10_17w-r2"),
                set = c("x", "x", "x", "x"),
                value = c(1, 2, 3, 4),
                group = c("g1", "g1", "g2", "g2"))
as_tibble(ds) |> group_by(group) |> heatmap(id, set, value)
# not sure why I need the as_tibble here

Note that 12.10 belongs to the group g1 and 12.10_17w to the group g2. However, the heatmap assigns 12.10 to the group g2 and 12.10_17w to the group g1:

image

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

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

other attached packages:
[1] tidyHeatmap_1.8.1 dplyr_1.1.4       modules_0.9.13

loaded via a namespace (and not attached):
 [1] viridis_0.6.5         utf8_1.2.4            generics_0.1.3
 [4] tidyr_1.3.1           xml2_1.3.6            shape_1.4.6.1
 [7] stringi_1.8.3         digest_0.6.35         magrittr_2.0.3
[10] grid_4.3.2            RColorBrewer_1.1-3    iterators_1.0.14
[13] circlize_0.4.16       foreach_1.5.2         doParallel_1.0.17
[16] GlobalOptions_0.1.2   gridExtra_2.3         ComplexHeatmap_2.18.0
[19] purrr_1.0.2           fansi_1.0.6           viridisLite_0.4.2
[22] scales_1.3.0          codetools_0.2-19      cli_3.6.2
[25] rlang_1.1.3           crayon_1.5.2          munsell_0.5.0
[28] withr_3.0.0           tools_4.3.2           parallel_4.3.2
[31] ggplot2_3.5.0         colorspace_2.1-0      GetoptLong_1.0.5
[34] BiocGenerics_0.48.1   vctrs_0.6.5           R6_2.5.1
[37] png_0.1-8             magick_2.8.3          matrixStats_1.2.0
[40] stats4_4.3.2          lifecycle_1.0.4       stringr_1.5.1
[43] S4Vectors_0.40.2      IRanges_2.36.0        clue_0.3-65
[46] cluster_2.1.6         dendextend_1.17.1     pkgconfig_2.0.3
[49] gtable_0.3.4          pillar_1.9.0          glue_1.7.0
[52] Rcpp_1.0.12           xfun_0.42             tibble_3.2.1
[55] tidyselect_1.2.1      knitr_1.45            rjson_0.2.21
[58] patchwork_1.2.0       compiler_4.3.2        roxygen2_7.3.1
@mschubert
Copy link
Author

I see this may be the same issue as #116

@stemangiola
Copy link
Owner

Hello all, thanks for bringing this to our attention. We will have a dedicated person for tidyomics who will also maintain tidyHeatmap.

Hopefully, this will happen soon.

@stemangiola
Copy link
Owner

On it..

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

No branches or pull requests

2 participants