scran ScoreMarkers throws a warning
1
0
Entering edit mode
Assa Yeroslaviz ★ 1.5k
@assa-yeroslaviz-1597
Last seen 14 days ago
Germany

When running the command scoreMarkers in R 4.3 The function throws this error I don't figure as this parameter doesn't exist in the function.

library(scran)
marker.info <- scoreMarkers(sce, colLabels(sce), full.stats=TRUE)

and the warning is multiple times this:

Warning: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE.

It doesn't even make sense.

I know it is not so worrisome, but it is annoying.

any ideas what it means?

thanks

Assa

> sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.4

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

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

time zone: Europe/Berlin
tzcode source: internal

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

other attached packages:
 [1] EnhancedVolcano_1.18.0      limma_3.56.2                ggraph_2.1.0                patchwork_1.1.2            
 [5] PCAtools_2.12.0             ensembldb_2.24.0            AnnotationFilter_1.24.0     GenomicFeatures_1.52.0     
 [9] gridExtra_2.3               ggrepel_0.9.3               scran_1.28.1                scater_1.28.0              
[13] scuttle_1.10.1              AnnotationDbi_1.62.1        AnnotationHub_3.8.0         BiocFileCache_2.8.0        
[17] dbplyr_2.3.2                SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2 Biobase_2.60.0             
[21] GenomicRanges_1.52.0        GenomeInfoDb_1.36.0         IRanges_2.34.0              S4Vectors_0.38.1           
[25] BiocGenerics_0.46.0         MatrixGenerics_1.12.0       matrixStats_1.0.0           lubridate_1.9.2            
[29] forcats_1.0.0               stringr_1.5.0               dplyr_1.1.2                 purrr_1.0.1                
[33] readr_2.1.4                 tidyr_1.3.0                 tibble_3.2.1                ggplot2_3.4.2              
[37] tidyverse_2.0.0             SeuratObject_4.1.3          Seurat_4.3.0               

loaded via a namespace (and not attached):
  [1] ProtGenerics_1.32.0           spatstat.sparse_3.0-1         bitops_1.0-7                  httr_1.4.6                   
  [5] RColorBrewer_1.1-3            backports_1.4.1               tools_4.3.0                   sctransform_0.3.5            
  [9] utf8_1.2.3                    R6_2.5.1                      lazyeval_0.2.2                uwot_0.1.14                  
 [13] withr_2.5.0                   sp_1.6-1                      prettyunits_1.1.1             progressr_0.13.0             
 [17] textshaping_0.3.6             cli_3.6.1                     spatstat.explore_3.2-1        labeling_0.4.2               
 [21] spatstat.data_3.0-1           ggridges_0.5.4                pbapply_1.7-0                 systemfonts_1.0.4            
 [25] Rsamtools_2.16.0              parallelly_1.36.0             rstudioapi_0.14               RSQLite_2.3.1                
 [29] FNN_1.1.3.2                   generics_0.1.3                BiocIO_1.10.0                 ica_1.0-3                    
 [33] spatstat.random_3.1-5         Matrix_1.5-4.1                ggbeeswarm_0.7.2              fansi_1.0.4                  
 [37] abind_1.4-5                   lifecycle_1.0.3               yaml_2.3.7                    edgeR_3.42.4                 
 [41] Rtsne_0.16                    grid_4.3.0                    blob_1.2.4                    promises_1.2.0.1             
 [45] dqrng_0.3.0                   crayon_1.5.2                  miniUI_0.1.1.1                lattice_0.21-8               
 [49] beachmat_2.16.0               cowplot_1.1.1                 KEGGREST_1.40.0               pillar_1.9.0                 
 [53] knitr_1.43                    metapod_1.8.0                 rjson_0.2.21                  future.apply_1.11.0          
 [57] codetools_0.2-19              leiden_0.4.3                  glue_1.6.2                    data.table_1.14.8            
 [61] vctrs_0.6.3                   png_0.1-8                     gtable_0.3.3                  cachem_1.0.8                 
 [65] xfun_0.39                     S4Arrays_1.0.4                mime_0.12                     tidygraph_1.2.3              
 [69] survival_3.5-5                statmod_1.5.0                 bluster_1.10.0                interactiveDisplayBase_1.38.0
 [73] ellipsis_0.3.2                fitdistrplus_1.1-11           ROCR_1.0-11                   nlme_3.1-162                 
 [77] bit64_4.0.5                   progress_1.2.2                filelock_1.0.2                RcppAnnoy_0.0.20             
 [81] irlba_2.3.5.1                 vipor_0.4.5                   KernSmooth_2.23-21            colorspace_2.1-0             
 [85] DBI_1.1.3                     tidyselect_1.2.0              bit_4.0.5                     compiler_4.3.0               
 [89] curl_5.0.1                    BiocNeighbors_1.18.0          xml2_1.3.4                    DelayedArray_0.26.3          
 [93] plotly_4.10.2                 rtracklayer_1.60.0            checkmate_2.2.0               scales_1.2.1                 
 [97] lmtest_0.9-40                 rappdirs_0.3.3                digest_0.6.31                 goftest_1.2-3                
[101] spatstat.utils_3.0-3          rmarkdown_2.22                XVector_0.40.0                htmltools_0.5.5              
[105] pkgconfig_2.0.3               sparseMatrixStats_1.12.0      fastmap_1.1.1                 rlang_1.1.1                  
[109] htmlwidgets_1.6.2             shiny_1.7.4                   DelayedMatrixStats_1.22.0     farver_2.1.1                 
[113] zoo_1.8-12                    jsonlite_1.8.5                BiocParallel_1.34.2           BiocSingular_1.16.0          
[117] RCurl_1.98-1.12               magrittr_2.0.3                GenomeInfoDbData_1.2.10       munsell_0.5.0                
[121] Rcpp_1.0.10                   viridis_0.6.3                 reticulate_1.29               stringi_1.7.12               
[125] zlibbioc_1.46.0               MASS_7.3-60                   plyr_1.8.8                    parallel_4.3.0               
[129] listenv_0.9.0                 deldir_1.0-9                  graphlayouts_1.0.0            Biostrings_2.68.1            
[133] splines_4.3.0                 tensor_1.5                    hms_1.1.3                     locfit_1.5-9.7               
[137] clustree_0.5.0                igraph_1.4.3                  spatstat.geom_3.2-1           reshape2_1.4.4               
[141] biomaRt_2.56.0                ScaledMatrix_1.8.1            BiocVersion_3.17.1            XML_3.99-0.14                
[145] evaluate_0.21                 BiocManager_1.30.20           tweenr_2.0.2                  tzdb_0.4.0                   
[149] httpuv_1.6.11                 RANN_2.6.1                    polyclip_1.10-4               future_1.32.0                
[153] scattermore_1.1               ggforce_0.4.1                 rsvd_1.0.5                    xtable_1.8-4                 
[157] restfulr_0.0.15               later_1.3.1                   ragg_1.2.5                    viridisLite_0.4.2            
[161] memoise_2.0.1                 beeswarm_0.4.0                GenomicAlignments_1.36.0      cluster_2.1.4                
[165] timechange_0.2.0              globals_0.16.2
scoreMarkers scran • 9.4k views
ADD COMMENT
2
Entering edit mode
ATpoint ★ 4.5k
@atpoint-13662
Last seen 1 day ago
Germany

My guess with the help of googleing this:

Taken together, any of the matrixStats-fu that is happening inside of this scran function uses some sort of not-super-recent code/command, likely not even something that the dev actively puts (or not), or it is DelayedMatrixStats that internally still uses this slightly outdated command/code -- that triggers this warning (not error)

So either ignore, try to update every relevant package (DelayedMatrixStats would be the first go-to), or put suppressWarnings(). If you google this error you see that this warning pops up in vignettes and Rmarkdowns of many packages, so it's a general boilerplatish thing, and not specific to scran.

ADD COMMENT
0
Entering edit mode

@atpoint's explanation of the issue is correct (I'm the developer of DelayedMatrixStats).

If you upgrade DelayedMatrixStats and MatrixGenerics to their latest versions (basically just run BiocManager::install() to update all your packages) this warning should go away. This is what I see with an up-to-date installation of Bioconductor 3.17.

suppressPackageStartupMessages(library(scran))

# Example adapted from ?scran::scoreMarkers
suppressPackageStartupMessages(library(scuttle))
sce <- mockSCE()
sce <- logNormCounts(sce)
# Any clustering method is okay, only using k-means for convenience.
kout <- kmeans(t(logcounts(sce)), centers=4) 
out <- scoreMarkers(sce, groups=kout$cluster, full.stats=TRUE)

BiocManager::valid()
#> 'getOption("repos")' replaces Bioconductor standard repositories, see
#> 'help("repositories", package = "BiocManager")' for details.
#> Replacement repositories:
#>     CRAN: https://cran.rstudio.com/
#> [1] TRUE

sessionInfo()
#> R version 4.3.0 (2023-04-21)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: CentOS Linux 7 (Core)
#> 
#> Matrix products: default
#> BLAS:   /stornext/System/data/apps/R/R-4.3.0/lib64/R/lib/libRblas.so 
#> LAPACK: /stornext/System/data/apps/R/R-4.3.0/lib64/R/lib/libRlapack.so;  LAPACK version 3.11.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] 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   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: Australia/Melbourne
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats4    stats     graphics  grDevices utils     datasets  methods  
#> [8] base     
#> 
#> other attached packages:
#>  [1] scran_1.28.1                scuttle_1.10.1             
#>  [3] SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2
#>  [5] Biobase_2.60.0              GenomicRanges_1.52.0       
#>  [7] GenomeInfoDb_1.36.0         IRanges_2.34.0             
#>  [9] S4Vectors_0.38.1            BiocGenerics_0.46.0        
#> [11] MatrixGenerics_1.12.2       matrixStats_1.0.0          
#> 
#> loaded via a namespace (and not attached):
#>  [1] dqrng_0.3.0               bitops_1.0-7             
#>  [3] lattice_0.21-8            magrittr_2.0.3           
#>  [5] digest_0.6.31             evaluate_0.21            
#>  [7] sparseMatrixStats_1.12.0  grid_4.3.0               
#>  [9] fastmap_1.1.1             Matrix_1.5-4             
#> [11] limma_3.56.2              BiocManager_1.30.21      
#> [13] codetools_0.2-19          cli_3.6.1                
#> [15] rlang_1.1.1               crayon_1.5.2             
#> [17] XVector_0.40.0            BiocNeighbors_1.18.0     
#> [19] reprex_2.0.2              withr_2.5.0              
#> [21] DelayedArray_0.26.3       yaml_2.3.7               
#> [23] metapod_1.8.0             S4Arrays_1.0.4           
#> [25] tools_4.3.0               beachmat_2.16.0          
#> [27] parallel_4.3.0            BiocParallel_1.34.2      
#> [29] locfit_1.5-9.8            GenomeInfoDbData_1.2.10  
#> [31] rsvd_1.0.5                lifecycle_1.0.3          
#> [33] zlibbioc_1.46.0           edgeR_3.42.4             
#> [35] BiocSingular_1.16.0       fs_1.6.2                 
#> [37] bluster_1.10.0            cluster_2.1.4            
#> [39] irlba_2.3.5.1             pkgconfig_2.0.3          
#> [41] ScaledMatrix_1.8.1        glue_1.6.2               
#> [43] Rcpp_1.0.10               statmod_1.5.0            
#> [45] xfun_0.39                 rstudioapi_0.14          
#> [47] knitr_1.43                igraph_1.5.0             
#> [49] htmltools_0.5.5           rmarkdown_2.22           
#> [51] DelayedMatrixStats_1.22.1 compiler_4.3.0           
#> [53] RCurl_1.98-1.12
ADD REPLY

Login before adding your answer.

Traffic: 608 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