HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
66 stars 30 forks source link

plotClusterHeatmap deprecated and now unable to extract the same data from the new Heatmap functions #393

Closed DrFedericaOrsenigo closed 1 month ago

DrFedericaOrsenigo commented 1 month ago

I used to extract data from plotClusterHeatmap to do statistical analysis on it, but on new versions of CATALYST this type of heatmap is deprecated and therefore I am not able to do so anymore. I used to extract data as follows:

p <- plotClusterHeatmap(sce, hm2=NULL, k="meta8", m=NULL, cluster_anno=TRUE, draw_freqs = TRUE) write.csv(p@matrix, "C:/Users/.../Heatmap sce meta8.csv")

The data extracted is very useful, as it has marker expression levels divided by cluster_id. Now it seems not possible to easily achieve the same by using plotExprHeatmap, plotFreqHeatmap nor plotMultiHeatmap. Using CATALYST version 1.24.0 I can still use plotClusterHeatmap, but new versions do not have it. I also tried to find a way of installing the version 1.24.0, but I cannot find a way.

Could you please advise on either how to extract the same type of data from any of the other heatmap functions (plotExprHeatmap, plotFreqHeatmap or plotMultiHeatmap) or on how to install specifically the older version (1.24.0) on devices? Thank you!

sessionInfo() below: `> sessionInfo() R version 4.3.0 (2023-04-21 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=English_United Kingdom.utf8
[3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.utf8

time zone: Europe/London tzcode source: internal

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

other attached packages: [1] reshape2_1.4.4 cowplot_1.1.1
[3] plotly_4.10.2 diffcyt_1.20.0
[5] ggplot2_3.4.2 HDCytoData_1.20.0
[7] flowCore_2.12.2 ExperimentHub_2.8.1
[9] AnnotationHub_3.8.0 BiocFileCache_2.8.0
[11] dbplyr_2.3.3 CATALYST_1.24.0
[13] SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2 [15] Biobase_2.60.0 GenomicRanges_1.52.0
[17] GenomeInfoDb_1.36.2 IRanges_2.34.1
[19] S4Vectors_0.38.1 BiocGenerics_0.46.0
[21] MatrixGenerics_1.12.3 matrixStats_1.0.0
[23] readxl_1.4.3

loaded via a namespace (and not attached): [1] later_1.3.1 splines_4.3.0
[3] bitops_1.0-7 filelock_1.0.2
[5] tibble_3.2.1 cellranger_1.1.0
[7] polyclip_1.10-4 XML_3.99-0.14
[9] rpart_4.1.19 lifecycle_1.0.3
[11] rstatix_0.7.2 edgeR_3.42.4
[13] doParallel_1.0.17 lattice_0.21-8
[15] MASS_7.3-58.4 backports_1.4.1
[17] magrittr_2.0.3 limma_3.56.2
[19] Hmisc_5.1-0 rmarkdown_2.23
[21] yaml_2.3.7 plotrix_3.8-2
[23] httpuv_1.6.11 minqa_1.2.5
[25] DBI_1.1.3 RColorBrewer_1.1-3
[27] ConsensusClusterPlus_1.64.0 multcomp_1.4-25
[29] abind_1.4-5 zlibbioc_1.46.0
[31] Rtsne_0.16 purrr_1.0.1
[33] RCurl_1.98-1.12 nnet_7.3-18
[35] TH.data_1.1-2 rappdirs_0.3.3
[37] tweenr_2.0.2 sandwich_3.0-2
[39] circlize_0.4.15 GenomeInfoDbData_1.2.10
[41] ggrepel_0.9.3 irlba_2.3.5.1
[43] DelayedMatrixStats_1.22.6 codetools_0.2-19
[45] DelayedArray_0.26.7 scuttle_1.10.2
[47] ggforce_0.4.1 tidyselect_1.2.0
[49] shape_1.4.6 farver_2.1.1
[51] lme4_1.1-33 ScaledMatrix_1.8.1
[53] viridis_0.6.3 base64enc_0.1-3
[55] jsonlite_1.8.4 GetoptLong_1.0.5
[57] BiocNeighbors_1.18.0 ellipsis_0.3.2
[59] Formula_1.2-5 ggridges_0.5.4
[61] survival_3.5-5 scater_1.28.0
[63] iterators_1.0.14 foreach_1.5.2
[65] tools_4.3.0 ggnewscale_0.4.9
[67] Rcpp_1.0.10 glue_1.6.2
[69] gridExtra_2.3 xfun_0.39
[71] dplyr_1.1.2 withr_2.5.0
[73] BiocManager_1.30.22 fastmap_1.1.1
[75] boot_1.3-28.1 fansi_1.0.4
[77] digest_0.6.31 rsvd_1.0.5
[79] mime_0.12 R6_2.5.1
[81] colorspace_2.1-0 Cairo_1.6-1
[83] gtools_3.9.4 RSQLite_2.3.1
[85] utf8_1.2.3 tidyr_1.3.0
[87] generics_0.1.3 data.table_1.14.8
[89] httr_1.4.6 htmlwidgets_1.6.2
[91] S4Arrays_1.0.6 pkgconfig_2.0.3
[93] gtable_0.3.3 blob_1.2.4
[95] ComplexHeatmap_2.16.0 RProtoBufLib_2.12.1
[97] XVector_0.40.0 htmltools_0.5.5
[99] carData_3.0-5 clue_0.3-64
[101] scales_1.2.1 png_0.1-8
[103] colorRamps_2.3.1 knitr_1.43
[105] rstudioapi_0.15.0 rjson_0.2.21
[107] nloptr_2.0.3 checkmate_2.2.0
[109] nlme_3.1-162 curl_5.2.0
[111] zoo_1.8-12 cachem_1.0.8
[113] GlobalOptions_0.1.2 stringr_1.5.0
[115] BiocVersion_3.17.1 parallel_4.3.0
[117] vipor_0.4.5 AnnotationDbi_1.62.2
[119] foreign_0.8-84 pillar_1.9.0
[121] grid_4.3.0 vctrs_0.6.2
[123] promises_1.2.0.1 ggpubr_0.6.0
[125] car_3.1-2 BiocSingular_1.16.0
[127] cytolib_2.12.1 beachmat_2.16.0
[129] xtable_1.8-4 cluster_2.1.4
[131] beeswarm_0.4.0 htmlTable_2.4.1
[133] evaluate_0.21 locfit_1.5-9.8
[135] mvtnorm_1.1-3 cli_3.6.1
[137] compiler_4.3.0 rlang_1.1.1
[139] crayon_1.5.2 ggsignif_0.6.4
[141] FlowSOM_2.8.0 plyr_1.8.8
[143] ggbeeswarm_0.7.2 stringi_1.7.12
[145] viridisLite_0.4.2 BiocParallel_1.34.2
[147] nnls_1.4 Biostrings_2.68.1
[149] munsell_0.5.0 lazyeval_0.2.2
[151] Matrix_1.6-1 sparseMatrixStats_1.12.2
[153] bit64_4.0.5 KEGGREST_1.40.0
[155] shiny_1.7.4.1 interactiveDisplayBase_1.38.0 [157] drc_3.0-1 igraph_1.5.0
[159] broom_1.0.5 memoise_2.0.1
[161] bit_4.0.5 ape_5.7-1 `

HelenaLC commented 1 month ago

Jup, its been deprecated for quite a while and now removed- the equivalent now should be plotPb… - however, I would strongly advise against using plotting functions to extract data for downstream testing. You can just aggregate data yourself, eg, using scater functions. Plotting functions might apply international filtering or transformations (as do many CATALYST functions)- this is meant for better visualization, but might not be desirable for statistical tests! Aggregating yourself gives you full control over a knowledge of what‘s happening.