fmicompbio / monaLisa

binned motif enrichment analysis and visualisation
https://fmicompbio.github.io/monaLisa/
GNU General Public License v3.0
36 stars 6 forks source link

`show_seqlogo` option does not work in `plotMotifHeatmaps` function #60

Closed jmodlis closed 2 years ago

jmodlis commented 2 years ago

Hello,

Thanks for your development of this package - it's really helped us to make sense of our data! Unfortunately I'm running into a problem with the show_seqlogo option in the plotMotifHeatmaps function. After I initially encountered the problem I attempted a forced re-installation of the package and noticed the Note in the installation process below.

installing the source package 'monaLisa'
trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/monaLisa_1.0.0.tar.gz'
Content type 'application/x-gzip' length 4961938 bytes (4.7 MB)
==================================================
downloaded 4.7 MB

* installing *source* package ‘monaLisa’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Note: possible error in 'AnnotationFunction(fun = fun, ': unused argument (subsetable = TRUE) 
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (monaLisa)

Below you can see the error when I run the command during the course of the vignette. Removing show_seqlogo=TRUE allows me to generate a heatmap but obviously the desired sequence logo is then missing.

> plotMotifHeatmaps(x = seSel, which.plots = c("log2enr"), 
+                    cluster = TRUE, maxEnr = 2, maxSig = 10, 
+                   show_dendrogram = TRUE, show_seqlogo = TRUE)
Error in AnnotationFunction(fun = fun, fun_name = "annoSeqlogo", which = which,  : 
  unused argument (subsetable = TRUE)

Here is my R version/session information:

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] circlize_0.4.15                          monaLisa_1.0.0                           BSgenome.Hsapiens.UCSC.hg38_1.4.4       
 [4] BSgenome_1.62.0                          rtracklayer_1.54.0                       Biostrings_2.62.0                       
 [7] XVector_0.34.0                           TFBSTools_1.32.0                         JASPAR2020_0.99.10                      
[10] unikn_0.4.0                              csaw_1.28.0                              AnnotationHub_3.2.2                     
[13] BiocFileCache_2.2.1                      dbplyr_2.1.1                             gggenomes_0.9.5.9000                    
[16] snakecase_0.11.0                         jsonlite_1.8.0                           tibble_3.1.7                            
[19] thacklr_0.0.0.9000                       tidyr_1.2.0                              stringr_1.4.0                           
[22] readr_2.1.2                              gggenes_0.4.1                            TxDb.Hsapiens.UCSC.hg38.knownGene_3.14.0
[25] GenomicFeatures_1.46.5                   org.Hs.eg.db_3.14.0                      AnnotationDbi_1.56.2                    
[28] Gviz_1.38.4                              readxl_1.4.0                             ComplexHeatmap_2.11.1                   
[31] viridis_0.6.2                            viridisLite_0.4.0                        rcartocolor_2.0.0                       
[34] scales_1.2.0                             purrr_0.3.4                              dplyr_1.0.9                             
[37] plyr_1.8.7                               nord_1.0.0                               yaml_2.3.5                              
[40] factoextra_1.0.7                         FactoMineR_2.4                           ggpointdensity_0.1.0                    
[43] ggridges_0.5.3                           DESeq2_1.34.0                            SummarizedExperiment_1.24.0             
[46] Biobase_2.54.0                           MatrixGenerics_1.6.0                     matrixStats_0.62.0                      
[49] GenomicRanges_1.46.1                     GenomeInfoDb_1.30.1                      IRanges_2.28.0                          
[52] S4Vectors_0.32.4                         BiocGenerics_0.40.0                      ggrepel_0.9.1                           
[55] ggplot2_3.3.6                            fgsea_1.20.0                             WriteXLS_6.4.0                          
[58] data.table_1.14.2                       

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3                R.methodsS3_1.8.1             vioplot_0.3.7                 bit64_4.0.5                   knitr_1.39                   
  [6] DelayedArray_0.20.0           R.utils_2.11.0                rpart_4.1.16                  KEGGREST_1.34.0               RCurl_1.98-1.6               
 [11] AnnotationFilter_1.18.0       doParallel_1.0.17             generics_0.1.2                cowplot_1.1.1                 RSQLite_2.2.14               
 [16] ggfittext_0.9.1               bit_4.0.4                     tzdb_0.3.0                    httpuv_1.6.5                  xml2_1.3.3                   
 [21] lubridate_1.8.0               assertthat_0.2.1              DirichletMultinomial_1.36.0   xfun_0.31                     hms_1.1.1                    
 [26] promises_1.2.0.1              evaluate_0.15                 fansi_1.0.3                   restfulr_0.0.13               progress_1.2.2               
 [31] caTools_1.18.2                DBI_1.1.2                     geneplotter_1.72.0            htmlwidgets_1.5.4             ellipsis_0.3.2               
 [36] ggpubr_0.4.0                  backports_1.4.1               bookdown_0.26                 annotate_1.72.0               biomaRt_2.50.3               
 [41] vctrs_0.4.1                   ensembldb_2.18.4              abind_1.4-5                   cachem_1.0.6                  withr_2.5.0                  
 [46] checkmate_2.1.0               GenomicAlignments_1.30.0      prettyunits_1.1.1             cluster_2.1.3                 lazyeval_0.2.2               
 [51] seqLogo_1.60.0                crayon_1.5.1                  genefilter_1.76.0             glmnet_4.1-4                  edgeR_3.36.0                 
 [56] pkgconfig_2.0.3               labeling_0.4.2                nlme_3.1-157                  ProtGenerics_1.26.0           nnet_7.3-17                  
 [61] pals_1.7                      rlang_1.0.2                   lifecycle_1.0.1               filelock_1.0.2                dichromat_2.0-0.1            
 [66] cellranger_1.1.0              Matrix_1.4-1                  carData_3.0-5                 stabs_0.6-4                   zoo_1.8-10                   
 [71] base64enc_0.1-3               GlobalOptions_0.1.2           png_0.1-7                     rjson_0.2.21                  bitops_1.0-7                 
 [76] R.oo_1.24.0                   pander_0.6.5                  blob_1.2.3                    shape_1.4.6                   jpeg_0.1-9                   
 [81] rstatix_0.7.0                 ggsignif_0.6.3                CNEr_1.30.0                   leaps_3.1                     memoise_2.0.1                
 [86] magrittr_2.0.3                zlibbioc_1.40.0               compiler_4.1.2                BiocIO_1.4.0                  RColorBrewer_1.1-3           
 [91] clue_0.3-61                   Rsamtools_2.10.0              cli_3.3.0                     htmlTable_2.4.0               Formula_1.2-4                
 [96] MASS_7.3-57                   mgcv_1.8-40                   tidyselect_1.1.2              stringi_1.7.6                 locfit_1.5-9.5               
[101] latticeExtra_0.6-29           VariantAnnotation_1.40.0      fastmatch_1.1-3               tools_4.1.2                   parallel_4.1.2               
[106] rstudioapi_0.13               TFMPvalue_0.0.8               foreach_1.5.2                 foreign_0.8-82                metapod_1.2.0                
[111] janitor_2.1.0                 gridExtra_2.3                 scatterplot3d_0.3-41          rmdformats_1.0.4              farver_2.1.0                 
[116] BiocManager_1.30.18           digest_0.6.29                 shiny_1.7.1                   pracma_2.3.8                  Rcpp_1.0.8.3                 
[121] car_3.0-13                    broom_0.8.0                   later_1.3.0                   BiocVersion_3.14.0            httr_1.4.3                   
[126] biovizBase_1.42.0             colorspace_2.0-3              XML_3.99-0.9                  splines_4.1.2                 sm_2.2-5.7                   
[131] mapproj_1.2.8                 xtable_1.8-4                  poweRlaw_0.70.6               flashClust_1.01-2             R6_2.5.1                     
[136] Hmisc_4.7-0                   mime_0.12                     pillar_1.7.0                  htmltools_0.5.2               glue_1.6.2                   
[141] fastmap_1.1.0                 DT_0.23                       BiocParallel_1.28.3           interactiveDisplayBase_1.32.0 codetools_0.2-18             
[146] maps_3.4.0                    utf8_1.2.2                    lattice_0.20-45               curl_4.3.2                    gtools_3.9.2.1               
[151] magick_2.7.3                  GO.db_3.14.0                  survival_3.3-1                limma_3.50.3                  rmarkdown_2.14               
[156] munsell_0.5.0                 GetoptLong_1.0.5              GenomeInfoDbData_1.2.7        iterators_1.0.14              reshape2_1.4.4               
[161] gtable_0.3.0  

Thanks your help with this! Jen

machlabd commented 2 years ago

Hello @jmodlis,

It seems to be due to a renaming of an argument in ComplexHeatmap which was fixed in the latest version of the package (https://github.com/fmicompbio/monaLisa/pull/58). I would therefore recommend using the latest version of monaLisa (version 1.2.0). Alternatively, you could also try using the version you are using (1.0.0) along with version 2.10.0 of ComplexHeatmap. Let me know if you still run into problems.

jmodlis commented 2 years ago

Thank you @machlabd, I updated ComplexHeatmap to version 2.10.0 and it is working! For some strange reason my R/Bioconductor (versions 4.1.2 and 3.14) doesn't install version 1.2.0 of monaLisa even when I use force=TRUE. I suspect it's due to installing from source on my Apple M1. Thanks again for your help!

machlabd commented 2 years ago

Great :) Bioconductor packages from release 3.15 were built on R version 4.2, have you also tried updating your R installation before installing the latest monaLisa? Not sure what else the problem could be here without seeing some error message. If you want to stick to Bioconductor release 3.14, then I think you need to use the solution which worked for you with the older package versions.

machlabd commented 2 years ago

Hi @jmodlis, I am closing this issue since the seqlogo problem was resolved for you. Should you wish further help with regards to installing the latest package or encounter more problems feel free to re-open this issue or start a new one.