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 in (function (..., deparse.level = 1) while using GSVA #139

Closed
ChihYingLu opened this issue Jan 24, 2025 · 5 comments
Closed

Error in (function (..., deparse.level = 1) while using GSVA #139

ChihYingLu opened this issue Jan 24, 2025 · 5 comments

Comments

@ChihYingLu
Copy link

Hi! Thank you for developing this great tool!

I am currently encountering an error while running the runEscape function with my Seurat object using the "GSVA" method and a personal gene set.

The code I used:
seurat_combined <- runEscape( seurat_combined, gene.sets = filtered_gene_sets, method = "GSVA", groups = 5000, min.size = 5, new.assay.name = "escape.GSVA" )

The error messages:
! 4177 genes with constant values throughout the samples
! Genes with constant values are discarded
! 12693 genes with constant non-zero values throughout the samples
! Genes with constant non-zero values are discarded
! Some gene sets have size one. Consider setting minSize > 1
! 6398 genes with constant values throughout the samples
! Genes with constant values are discarded
! 14765 genes with constant non-zero values throughout the samples
! Genes with constant non-zero values are discarded
! Some gene sets have size one. Consider setting minSize > 1
Error in (function (..., deparse.level = 1) :
number of rows of matrices must match (see arg 2)

I found a similar issue related to a different method ("AUCell"), which had been resolved.
Currently, I am trying to rerun by using all the cells at once.

Do you have any insights into the possible cause of this error and how I might resolve it?
Thank you very much!

Sincerely,
Chih-Ying

@ChihYingLu
Copy link
Author

Below is my sesssionInfo:

R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3; LAPACK version 3.9.0

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=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Asia/Taipei
tzcode source: system (glibc)

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

other attached packages:
[1] ggplot2_3.5.1 dplyr_1.1.4 Seurat_5.2.0 SeuratObject_5.0.2 sp_2.1-4 escape_2.2.2

loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.22 splines_4.3.3 later_1.4.1 bitops_1.0-9
[5] tibble_3.2.1 R.oo_1.27.0 polyclip_1.10-7 graph_1.84.1
[9] XML_3.99-0.18 fastDummies_1.7.5 lifecycle_1.0.4 globals_0.16.3
[13] lattice_0.22-5 MASS_7.3-60 ggdist_3.3.2 magrittr_2.0.3
[17] plotly_4.10.4 remotes_2.5.0 httpuv_1.6.15 sctransform_0.4.1
[21] spam_2.11-1 spatstat.sparse_3.1-0 sessioninfo_1.2.2 pkgbuild_1.4.6
[25] reticulate_1.40.0 cowplot_1.1.3 pbapply_1.7-2 DBI_1.2.3
[29] RColorBrewer_1.1-3 abind_1.4-8 pkgload_1.4.0 zlibbioc_1.48.2
[33] Rtsne_0.17 GenomicRanges_1.54.1 purrr_1.0.2 R.utils_2.12.3
[37] BiocGenerics_0.48.1 msigdbr_7.5.1 RCurl_1.98-1.16 GenomeInfoDbData_1.2.11
[41] IRanges_2.36.0 S4Vectors_0.40.2 ggrepel_0.9.6 irlba_2.3.5.1
[45] spatstat.utils_3.1-2 listenv_0.9.1 GSVA_2.1.5 goftest_1.2-3
[49] RSpectra_0.16-2 spatstat.random_3.3-2 annotate_1.80.0 fitdistrplus_1.2-2
[53] parallelly_1.41.0 DelayedMatrixStats_1.24.0 codetools_0.2-19 DelayedArray_0.28.0
[57] tidyselect_1.2.1 farver_2.1.2 UCell_2.6.2 ScaledMatrix_1.10.0
[61] spatstat.explore_3.3-4 matrixStats_1.5.0 stats4_4.3.3 jsonlite_1.8.9
[65] BiocNeighbors_1.20.2 ellipsis_0.3.2 progressr_0.15.1 ggridges_0.5.6
[69] survival_3.5-7 tools_4.3.3 ica_1.0-3 Rcpp_1.0.14
[73] glue_1.8.0 gridExtra_2.3 SparseArray_1.2.4 MatrixGenerics_1.14.0
[77] distributional_0.5.0 usethis_3.1.0 GenomeInfoDb_1.38.8 AUCell_1.24.0
[81] HDF5Array_1.30.1 withr_3.0.2 BiocManager_1.30.25 fastmap_1.2.0
[85] rhdf5filters_1.14.1 ggpointdensity_0.1.0 digest_0.6.37 rsvd_1.0.5
[89] R6_2.5.1 mime_0.12 colorspace_2.1-1 scattermore_1.2
[93] tensor_1.5 spatstat.data_3.1-4 RSQLite_2.3.9 R.methodsS3_1.8.2
[97] tidyr_1.3.1 generics_0.1.3 data.table_1.16.4 httr_1.4.7
[101] htmlwidgets_1.6.4 S4Arrays_1.2.1 uwot_0.2.2 pkgconfig_2.0.3
[105] gtable_0.3.6 blob_1.2.4 lmtest_0.9-40 SingleCellExperiment_1.24.0
[109] XVector_0.42.0 htmltools_0.5.8.1 profvis_0.4.0 dotCall64_1.2
[113] GSEABase_1.64.0 scales_1.3.0 Biobase_2.62.0 png_0.1-8
[117] SpatialExperiment_1.12.0 spatstat.univar_3.1-1 rstudioapi_0.17.1 reshape2_1.4.4
[121] rjson_0.2.23 nlme_3.1-163 cachem_1.1.0 zoo_1.8-12
[125] rhdf5_2.46.1 stringr_1.5.1 KernSmooth_2.23-22 parallel_4.3.3
[129] miniUI_0.1.1.1 AnnotationDbi_1.64.1 pillar_1.10.1 grid_4.3.3
[133] vctrs_0.6.5 RANN_2.6.2 urlchecker_1.0.1 promises_1.3.2
[137] BiocSingular_1.18.0 beachmat_2.18.1 xtable_1.8-4 cluster_2.1.6
[141] magick_2.8.5 cli_3.6.3 compiler_4.3.3 rlang_1.1.5
[145] crayon_1.5.3 future.apply_1.11.3 plyr_1.8.9 fs_1.6.5
[149] stringi_1.8.4 deldir_2.0-4 viridisLite_0.4.2 BiocParallel_1.36.0
[153] babelgene_22.9 munsell_0.5.1 Biostrings_2.70.3 lazyeval_0.2.2
[157] spatstat.geom_3.3-5 devtools_2.4.5 Matrix_1.6-5 RcppHNSW_0.6.0
[161] patchwork_1.3.0 sparseMatrixStats_1.14.0 bit64_4.6.0-1 future_1.34.0
[165] Rhdf5lib_1.24.2 KEGGREST_1.42.0 shiny_1.10.0 SummarizedExperiment_1.32.0
[169] ROCR_1.0-11 igraph_2.1.4 memoise_2.0.1 bit_4.5.0.1

ncborcherding added a commit that referenced this issue Jan 24, 2025
#139 Fixed how data is split and handled during escape calculation
@ncborcherding
Copy link
Member

@ChihYingLu

Thanks for bringing this to my attention and linking the previous issue as well. I found a potential issue with how the splitting by group parameter may alter the final cbind() call that combines all the enrichment scores into a single matrix, which could lead to the error you see.

I have commited a fix to the dev branch and it is currently being tested for merging with the main branch - this version will be 2.2.3.

However, it is important to note, I could not replicate the issue - so please if you are willing, once the new main versions is update (in the next 1 HR), could you check if this solves your issue and report back?

Thanks,
Nick

@ChihYingLu
Copy link
Author

Hi Nick,

Thank you very much for your quick response! After using all cells at once, the error did not appear, so I think you are correct about the potential issue with the "group" parameter.

I will test the latest version with my original parameters. However, it may take some time, as my previous run took about 14 hours. I'm not sure if this is normal, but my gene set is quite large, containing 14,357 elements. I will update you on the results after rerunning with the new version, possibly by tomorrow.

Thanks again!

Best,
Chih-Ying

@ChihYingLu
Copy link
Author

Hi Nick,

Using the latest version of escape (2.2.3),

seurat_combined <- runEscape(
seurat_combined,
gene.sets = filtered_gene_sets,
groups = 5000,
method = "GSVA",
min.size = 5,
new.assay.name = "escape.GSVA"
)

finished perfectly without any error messages.
Thank you for the help!

Best,
Chih-Ying

@ncborcherding
Copy link
Member

Thanks so much for the follow up and glad things are working!!

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