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

error matrixStats #222

Open
jmzhang1911 opened this issue Jan 20, 2025 · 1 comment
Open

error matrixStats #222

jmzhang1911 opened this issue Jan 20, 2025 · 1 comment

Comments

@jmzhang1911
Copy link

Still encountering errors when using GSVA version 2.0.4.

gsvapar <- gsvaParam(as.matrix(expr_tpm_symbol), gene_list,  maxDiff =TRUE, kcdf=c("Gaussian"), minSize=5, maxSize = 150)
gsva_res = GSVA::gsva( gsvapar)
ℹ GSVA version 2.0.4

ℹ Calculating GSVA ranks

ℹ GSVA dense (classical) algorithm

ℹ Row-wise ECDF estimation with Gaussian kernels

ℹ Calculating GSVA column ranks

Error: [matrixStats (>= 1.2.0)] useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE. See also ?matrixStats::matrixStats.options
Traceback:

1. GSVA::gsva(gsvapar)
2. GSVA::gsva(gsvapar)
3. .local(param, ...)
4. gsvaRanks(param = param, verbose = verbose, BPPARAM = BPPARAM)
5. gsvaRanks(param = param, verbose = verbose, BPPARAM = BPPARAM)
6. .local(param, ...)
7. .compute_gsva_ranks(expr = filteredDataMatrix, kcdf = get_kcdf(param), 
 .     kcdf.min.ssize = kcdfminssize, sparse = get_sparse(param), 
 .     any_na = anyNA(param), na_use = get_NAuse(param), verbose = verbose, 
 .     BPPARAM = BPPARAM)
8. colRanks(Z, ties.method = "last", preserveShape = TRUE)
9. colRanks(Z, ties.method = "last", preserveShape = TRUE)
10. .local(x, rows, cols, ties.method, ..., useNames = useNames)
11. matrixStats::colRanks(x = x, rows = rows, cols = cols, ties.method = ties.method, 
  .     dim. = dim., preserveShape = preserveShape, ..., useNames = useNames)
12. deprecatedUseNamesNA()
13. .Defunct(msg = sprintf("[%s (>= 1.2.0)] useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE. See also ?matrixStats::matrixStats.options", 
  .     .packageName), package = .packageName)
R version 4.2.3 (2023-03-15)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /share_gpu/zhangjm/software/miniforge3/envs/scverse/lib/libopenblasp-r0.3.28.so

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       

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

other attached packages:
 [1] GSVA_2.0.4            circlize_0.4.16       ComplexHeatmap_2.14.0
 [4] RColorBrewer_1.1-3    lubridate_1.9.3       forcats_1.0.0        
 [7] stringr_1.5.1         dplyr_1.1.4           purrr_1.0.2          
[10] readr_2.1.5           tidyr_1.3.1           tibble_3.2.1         
[13] ggplot2_3.5.1         tidyverse_2.0.0      

loaded via a namespace (and not attached):
  [1] SpatialExperiment_1.8.1     colorspace_2.1-0           
  [3] rjson_0.2.23                scuttle_1.8.4              
  [5] IRdisplay_1.1               XVector_0.38.0             
  [7] GenomicRanges_1.50.2        GlobalOptions_0.1.2        
  [9] base64enc_0.1-3             clue_0.3-66                
 [11] farver_2.1.2                bit64_4.0.5                
 [13] AnnotationDbi_1.60.2        fansi_1.0.6                
 [15] codetools_0.2-20            R.methodsS3_1.8.2          
 [17] sparseMatrixStats_1.10.0    doParallel_1.0.17          
 [19] cachem_1.1.0                IRkernel_1.3.2             
 [21] jsonlite_1.8.8              annotate_1.76.0            
 [23] cluster_2.1.6               png_0.1-8                  
 [25] R.oo_1.27.0                 graph_1.76.0               
 [27] HDF5Array_1.26.0            msigdbr_7.5.1              
 [29] compiler_4.2.3              httr_1.4.7                 
 [31] dqrng_0.4.1                 Matrix_1.6-5               
 [33] fastmap_1.2.0               limma_3.54.2               
 [35] cli_3.6.3                   BiocSingular_1.14.0        
 [37] htmltools_0.5.8.1           tools_4.2.3                
 [39] rsvd_1.0.5                  gtable_0.3.5               
 [41] glue_1.7.0                  GenomeInfoDbData_1.2.9     
 [43] Rcpp_1.0.12                 Biobase_2.58.0             
 [45] vctrs_0.6.5                 Biostrings_2.66.0          
 [47] rhdf5filters_1.10.1         babelgene_22.9             
 [49] iterators_1.0.14            DelayedMatrixStats_1.20.0  
 [51] beachmat_2.14.2             timechange_0.3.0           
 [53] lifecycle_1.0.4             irlba_2.3.5.1              
 [55] XML_3.99-0.17               edgeR_3.40.2               
 [57] zlibbioc_1.44.0             scales_1.3.0               
 [59] hms_1.1.3                   MatrixGenerics_1.10.0      
 [61] parallel_4.2.3              SummarizedExperiment_1.28.0
 [63] rhdf5_2.42.1                SingleCellExperiment_1.20.1
 [65] memoise_2.0.1               stringi_1.8.4              
 [67] RSQLite_2.3.9               S4Vectors_0.36.2           
 [69] foreach_1.5.2               ScaledMatrix_1.6.0         
 [71] BiocGenerics_0.44.0         BiocParallel_1.32.6        
 [73] shape_1.4.6.1               repr_1.1.7                 
 [75] GenomeInfoDb_1.34.9         rlang_1.1.4                
 [77] pkgconfig_2.0.3             matrixStats_1.3.0          
 [79] bitops_1.0-9                evaluate_0.24.0            
 [81] lattice_0.22-6              Rhdf5lib_1.20.0            
 [83] labeling_0.4.3              bit_4.0.5                  
 [85] tidyselect_1.2.1            GSEABase_1.60.0            
 [87] magrittr_2.0.3              R6_2.5.1                   
 [89] magick_2.8.3                IRanges_2.32.0             
 [91] generics_0.1.3              pbdZMQ_0.3-13              
 [93] DelayedArray_0.24.0         DBI_1.2.3                  
 [95] pillar_1.9.0                withr_3.0.0                
 [97] KEGGREST_1.38.0             RCurl_1.98-1.16            
 [99] crayon_1.5.3                DropletUtils_1.18.1        
[101] uuid_1.2-0                  utf8_1.2.4                 
[103] tzdb_0.4.0                  GetoptLong_1.0.5           
[105] locfit_1.5-9.10             blob_1.2.4                 
[107] digest_0.6.36               xtable_1.8-4               
[109] R.utils_2.12.3              stats4_4.2.3               
[111] munsell_0.5.1              

@rcastelo
Copy link
Owner

Hi, that error originates in an upstream dependency of GSVA, in matrixStats, concretely after the argument use.names=NA became defunct on December, 11th, 2023 (see here).

While you seem to be running the latest release version of GSVA (2.0.4), you installation of GSVA and other Bioconductor packages from the latest release 3.20 is malformed because according to your session information you are running R 4.2.3, while Bioconductor packages from release 3.20 should be running on top of R version 4.4.x (see https://www.bioconductor.org/install). So probably, you have a mix of Bioconductor packages of different releases, where one of those must be doing the deprecated call to the API of matrixStats.

What you should do to resolve this is follow strictly the instructions at https://www.bioconductor.org/install, i.e., install the latest release version of R 4.4.2 available at https://cran.r-project.org, then install the BiocManager package from CRAN, and finally install the latest release of GSVA by doing:

BiocManager::install("GSVA")

and all should be fine.

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