plotHeatmap annotation error
1
0
Entering edit mode
Alina • 0
@36288a68
Last seen 17 months ago
Spain

Hi, I'm having trouble adding an annotation column to my heatmap. My heatmap does not show the annotation column. Can you tell me what might be the problem? This is an example code:

sce <- mockSCE()
sce <- logNormCounts(sce)
plotHeatmap(sce[1:10,1:10], features=rownames(sce)[1:10],
            colour_columns_by="Cell_Cycle", center=TRUE)
plotHeatmap scater • 1.2k views
ADD COMMENT
0
Entering edit mode

This works fine for me. Can you post your sessionInfo()?

ADD REPLY
0
Entering edit mode

R version 4.2.1 (2022-06-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Rocky Linux 8.7 (Green Obsidian)

Matrix products: default BLAS/LAPACK: /g/easybuild/x86_64/Rocky/8/haswell/software/FlexiBLAS/3.2.0-GCC-11.3.0/lib64/libflexiblas.so.3.2

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

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

other attached packages: [1] iSEEu_1.8.0 shiny_1.7.1 iSEE_2.8.0 GGally_2.1.2 igraph_1.3.2
[6] NewWave_1.6.0 scry_1.8.0 deMULTIplex2_1.0.1 MESS_0.5.9 DEsingle_1.16.0
[11] org.Hs.eg.db_3.15.0 AnnotationDbi_1.58.0 progeny_1.18.0 ggraph_2.0.5 Neighborseq_0.1.0
[16] apeglm_1.18.0 glmGamPoi_1.8.0 plotly_4.10.1 batchelor_1.12.3 pheatmap_1.0.12
[21] MAST_1.22.0 ggrepel_0.9.1 NMF_0.25 bigmemory_4.6.1 cluster_2.1.3
[26] rngtools_1.5.2 registry_0.5-1 data.table_1.14.2 msigdbr_7.5.1 SingleR_1.10.0
[31] celldex_1.6.0 writexl_1.4.0 bluster_1.6.0 scDblFinder_1.10.0 scran_1.24.1
[36] scater_1.24.0 scuttle_1.6.3 SingleCellExperiment_1.18.1 umap_0.2.9.0 reticulate_1.26
[41] deMULTIplex_1.0.2 SeuratObject_4.1.3 Seurat_4.2.1 limma_3.52.2 forcats_0.5.1
[46] stringr_1.5.0 dplyr_1.1.2 purrr_1.0.1 readr_2.1.2 tidyr_1.3.0
[51] tibble_3.2.1 tidyverse_1.3.1 RColorBrewer_1.1-3 xlsx_0.6.5 readxl_1.4.0
[56] rstatix_0.7.0 ggpubr_0.4.0 ggplot2_3.4.2 clusterProfiler_4.4.4 DESeq2_1.36.0
[61] SummarizedExperiment_1.26.1 Biobase_2.56.0 MatrixGenerics_1.8.1 matrixStats_0.62.0 GenomicRanges_1.48.0
[66] GenomeInfoDb_1.32.2 IRanges_2.30.0 S4Vectors_0.34.0 BiocGenerics_0.42.0

ADD REPLY
0
Entering edit mode

loaded via a namespace (and not attached): [1] graphlayouts_0.8.0 pbapply_1.5-0 lattice_0.20-45 rJava_1.0-6
[5] haven_2.5.0 vctrs_0.6.2 rintrojs_0.3.2 mgcv_1.8-40
[9] blob_1.2.3 survival_3.3-1 spatstat.data_3.0-0 later_1.3.0
[13] DBI_1.1.3 rappdirs_0.3.3 uwot_0.1.14 dqrng_0.3.0
[17] jpeg_0.1-9 zlibbioc_1.42.0 GlobalOptions_0.1.2 htmlwidgets_1.5.4
[21] mvtnorm_1.1-3 future_1.26.1 miscTools_0.6-26 leiden_0.4.2
[25] parallel_4.2.1 irlba_2.3.5 tidygraph_1.2.1 Rcpp_1.0.8.3
[29] KernSmooth_2.23-20 DT_0.23 promises_1.2.0.1 DelayedArray_0.22.0
[33] ShortRead_1.54.0 RSpectra_0.16-1 fs_1.5.2 fastmatch_1.1-3
[37] mnormt_2.1.0 digest_0.6.29 png_0.1-7 sctransform_0.3.5
[41] scatterpie_0.1.7 cowplot_1.1.1 DOSE_3.22.0 pkgconfig_2.0.3
[45] GO.db_3.15.0 gridBase_0.4-7 spatstat.random_3.0-1 ggnewscale_0.4.7
[49] DelayedMatrixStats_1.18.0 ggbeeswarm_0.6.0 iterators_1.0.14 emdbook_1.3.12
[53] circlize_0.4.15 beeswarm_0.4.0 bslib_0.3.1 GetoptLong_1.0.5
[57] xfun_0.31 zoo_1.8-10 tidyselect_1.2.0 reshape2_1.4.4
[61] ica_1.0-2 labelled_2.9.1 viridisLite_0.4.0 rtracklayer_1.56.1
[65] rlang_1.1.1 jquerylib_0.1.4 ggformula_0.10.1 glue_1.6.2
[69] metap_1.8 modelr_0.1.8 ggsignif_0.6.3 mutoss_0.1-12
[73] httpuv_1.6.5 BiocNeighbors_1.14.0 TH.data_1.1-1 DO.db_2.9
[77] annotate_1.74.0 jsonlite_1.8.4 XVector_0.36.0 bit_4.0.4
[81] mime_0.12 gridExtra_2.3 Rsamtools_2.12.0 stringi_1.7.6
[85] spatstat.sparse_3.0-0 scattermore_0.8 spatstat.explore_3.0-3 rbibutils_2.2.8
[89] yulab.utils_0.0.5 bitops_1.0-7 cli_3.6.1 Rdpack_2.3.1
[93] RSQLite_2.2.14 bigmemory.sri_0.1.3 rstudioapi_0.14 GenomicAlignments_1.32.0
[97] nlme_3.1-158 qvalue_2.28.0 locfit_1.5-9.5 listenv_0.8.0
[101] miniUI_0.1.1.1 gridGraphics_0.5-1 dbplyr_2.3.2 lifecycle_1.0.3
[105] mosaicCore_0.9.0 ExperimentHub_2.4.0 munsell_0.5.0 cellranger_1.1.0
[109] hwriter_1.3.2.1 codetools_0.2-18 coda_0.19-4 vipor_0.4.5
[113] lmtest_0.9-40 shinyWidgets_0.7.0 xlsxjars_0.6.1 xtable_1.8-4
[117] ROCR_1.0-11 BiocManager_1.30.18 abind_1.4-5 farver_2.1.0
[121] parallelly_1.32.0 ResidualMatrix_1.6.0 ggExtra_0.10.0 AnnotationHub_3.4.0
[125] RANN_2.6.1 aplot_0.1.6 askpass_1.1 ggtree_3.4.1
[129] BiocIO_1.6.0 RcppAnnoy_0.0.19 goftest_1.2-3 patchwork_1.1.2
[133] future.apply_1.9.0 Matrix_1.5-1 tidytree_0.3.9 ellipsis_0.3.2
[137] shinydashboard_0.7.2 lubridate_1.8.0 ggridges_0.5.3 reprex_2.0.1
[141] multtest_2.52.0 ggstance_0.3.5 fgsea_1.22.0 shinyjs_2.1.0
[145] TFisher_0.2.0 spatstat.utils_3.0-1 htmltools_0.5.2 BiocFileCache_2.4.0
[149] yaml_2.3.5 utf8_1.2.2 interactiveDisplayBase_1.34.0 XML_3.99-0.10
[153] withr_2.5.0 fitdistrplus_1.1-8 BiocParallel_1.30.4 bit64_4.0.5
[157] xgboost_1.6.0.1 multiROC_1.1.1 multcomp_1.4-19 foreach_1.5.2
[161] Biostrings_2.64.0 progressr_0.10.1 GOSemSim_2.22.0 rsvd_1.0.5
[165] ScaledMatrix_1.4.0 evaluate_0.15 memoise_2.0.1 VGAM_1.1-6
[169] geepack_1.3.4 geneplotter_1.74.0 tzdb_0.3.0 gamlss.data_6.0-2
[173] gamlss_5.4-3 curl_4.3.2 qqconf_1.2.3 fansi_1.0.3
[177] tensor_1.5 edgeR_3.38.1 cachem_1.0.6 deldir_1.0-6
[181] maxLik_1.5-2 babelgene_22.3 metapod_1.4.0 rjson_0.2.21
[185] clue_0.3-61 tools_4.2.1 sass_0.4.1 sandwich_3.0-2
[189] magrittr_2.0.3 RCurl_1.98-1.7 car_3.1-0 ape_5.6-2
[193] ggplotify_0.1.0 xml2_1.3.3 rmarkdown_2.14 httr_1.4.6
[197] boot_1.3-28 globals_0.15.0 R6_2.5.1 stringdist_0.9.8
[201] genefilter_1.78.0 KEGGREST_1.36.2 treeio_1.20.1 shape_1.4.6
[205] gtools_3.9.2.2 statmod_1.4.36 beachmat_2.12.0 BiocVersion_3.15.2
[209] BiocSingular_1.12.0 splines_4.2.1 carData_3.0-5 ggfun_0.0.6
[213] colorspace_2.0-3 generics_0.1.2 pillar_1.9.0 sn_2.0.2
[217] tweenr_1.0.2 sp_1.5-1 uuid_1.1-0 GenomeInfoDbData_1.2.8
[221] plyr_1.8.7 gtable_0.3.0 bdsmatrix_1.3-6 rvest_1.0.2
[225] colourpicker_1.1.1 restfulr_0.0.15 ComplexHeatmap_2.12.0 latticeExtra_0.6-29
[229] knitr_1.39 gamlss.dist_6.0-3 shadowtext_0.1.2 fastmap_1.1.0
[233] pscl_1.5.5 doParallel_1.0.17 broom_1.0.4 SharedObject_1.10.0
[237] openssl_2.0.2 scales_1.2.0 filelock_1.0.2 backports_1.4.1
[241] plotrix_3.8-2 enrichplot_1.16.2 hms_1.1.1 ggforce_0.3.3
[245] Rtsne_0.16 polyclip_1.10-0 grid_4.2.1 numDeriv_2016.8-1.1
[249] mathjaxr_1.6-0 bbmle_1.0.25 lazyeval_0.2.2 geeM_0.10.1
[253] crayon_1.5.1 shinyAce_0.4.2 MASS_7.3-57 downloader_0.4
[257] sparseMatrixStats_1.8.0 reshape_0.8.9 viridis_0.6.2 compiler_4.2.1
[261] spatstat.geom_3.0-3

ADD REPLY
0
Entering edit mode

You need to use color_columns_by for that version of scater, not colour_columns_by.

ADD REPLY
0
Entering edit mode

Awesome! Thank you!!

ADD REPLY
0
Entering edit mode
@alanocallaghan-14291
Last seen 5 months ago
United Kingdom

For scater version 1.24.0 and earlier, try:

library("scater")
sce <- mockSCE()
sce <- logNormCounts(sce)
plotHeatmap(sce[1:10,1:10], features=rownames(sce)[1:10], color_columns_by="Cell_Cycle", center=TRUE)
ADD COMMENT

Login before adding your answer.

Traffic: 448 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6