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

SketchData: Error in Calculating Leverage Score, fails with "NA/NaN/Inf in qr() function" error #9690

Open
nicholaslimwy opened this issue Feb 18, 2025 · 0 comments

Comments

@nicholaslimwy
Copy link

Hi! I've got a dataset of ~500k cells and was trying to use SketchData to scale my analysis. The dataset is a merged combination of 3 publicly available datasets of GEO + my own samples. Unfortunately everytime I try to run SketchData I run into the error "Calcuating Leverage Score
Error in qr.default(x = sa) : NA/NaN/Inf in foreign function call (arg 1)"

Here is my code:

finalpdc<-finalpdc<-merge(combatpdc,y=list(hivpdc,pdc,iavpdc))
finalpdc <- NormalizeData(finalpdc, normalization.method = "LogNormalize")
finalpdc <- FindVariableFeatures(finalpdc, verbose = F)
finalpdc <- SketchData(
  object = finalpdc,
  assay='RNA',
  ncells = 50000,
  method = "LeverageScore",
  sketched.assay = "sketch"
)
─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.0 (2023-04-21)
 os       Ubuntu 22.04.1 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Etc/UTC
 date     2025-02-18
 rstudio  2023.03.0+386 Cherry Blossom (server)
 pandoc   2.19.2 @ /usr/lib/rstudio-server/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package              * version    date (UTC) lib source
 abind                  1.4-5      2016-07-21 [1] RSPM (R 4.3.0)
 backports              1.4.1      2021-12-13 [1] RSPM (R 4.3.0)
 Biobase                2.60.0     2023-04-25 [1] Bioconductor
 BiocGenerics           0.46.0     2023-04-25 [1] Bioconductor
 BiocParallel           1.34.2     2023-05-22 [1] Bioconductor
 bitops                 1.0-7      2021-04-24 [1] RSPM (R 4.3.0)
 broom                  1.0.4      2023-03-11 [1] RSPM (R 4.3.0)
 cachem                 1.0.7      2023-02-24 [1] RSPM (R 4.3.0)
 callr                  3.7.3      2022-11-02 [1] RSPM (R 4.3.0)
 car                    3.1-3      2024-09-27 [1] RSPM (R 4.3.0)
 carData                3.0-5      2022-01-06 [1] RSPM (R 4.3.0)
 circlize               0.4.16     2024-02-20 [1] RSPM (R 4.3.0)
 cli                    3.6.1      2023-03-23 [1] RSPM (R 4.3.0)
 clue                   0.3-66     2024-11-13 [1] RSPM (R 4.3.0)
 cluster                2.1.4      2022-08-22 [2] CRAN (R 4.3.0)
 codetools              0.2-19     2023-02-01 [2] CRAN (R 4.3.0)
 colorspace             2.1-0      2023-01-23 [1] RSPM (R 4.3.0)
 ComplexHeatmap       * 2.16.0     2023-04-25 [1] Bioconductor
 cowplot              * 1.1.1      2020-12-30 [1] RSPM (R 4.3.0)
 crayon                 1.5.2      2022-09-29 [1] RSPM (R 4.3.0)
 data.table           * 1.14.8     2023-02-17 [1] RSPM (R 4.3.0)
 decoupleR            * 2.9.7      2025-02-18 [1] Github (saezlab/decoupleR@3a41229)
 DelayedArray           0.26.3     2023-05-22 [1] Bioconductor
 deldir                 1.0-6      2021-10-23 [1] RSPM (R 4.3.0)
 devtools               2.4.5      2022-10-11 [1] RSPM (R 4.3.0)
 digest                 0.6.31     2022-12-11 [1] RSPM (R 4.3.0)
 doParallel             1.0.17     2022-02-07 [1] RSPM (R 4.3.0)
 dotCall64              1.2        2024-10-04 [1] RSPM (R 4.3.0)
 dplyr                * 1.1.2      2023-04-20 [1] RSPM (R 4.3.0)
 ellipsis               0.3.2      2021-04-29 [1] RSPM (R 4.3.0)
 evaluate               0.20       2023-01-17 [1] RSPM (R 4.3.0)
 fansi                  1.0.4      2023-01-22 [1] RSPM (R 4.3.0)
 farver                 2.1.1      2022-07-06 [1] RSPM (R 4.3.0)
 fastDummies            1.7.5      2025-01-20 [1] RSPM (R 4.3.0)
 fastmap                1.1.1      2023-02-24 [1] RSPM (R 4.3.0)
 fastmatch              1.1-6      2024-12-23 [1] RSPM (R 4.3.0)
 fgsea                * 1.26.0     2023-04-25 [1] Bioconductor
 fitdistrplus           1.1-11     2023-04-25 [1] RSPM (R 4.3.0)
 forcats              * 1.0.0      2023-01-29 [1] RSPM (R 4.3.0)
 foreach                1.5.2      2022-02-02 [1] RSPM (R 4.3.0)
 Formula                1.2-5      2023-02-24 [1] RSPM (R 4.3.0)
 fs                     1.6.2      2023-04-25 [1] RSPM (R 4.3.0)
 future                 1.32.0     2023-03-07 [1] RSPM (R 4.3.0)
 future.apply           1.11.0     2023-05-21 [1] RSPM (R 4.3.0)
 generics               0.1.3      2022-07-05 [1] RSPM (R 4.3.0)
 GenomeInfoDb           1.36.0     2023-04-25 [1] Bioconductor
 GenomeInfoDbData       1.2.10     2023-05-16 [1] Bioconductor
 GenomicRanges          1.52.0     2023-04-25 [1] Bioconductor
 GetoptLong             1.0.5      2020-12-15 [1] RSPM (R 4.3.0)
 GGally               * 2.2.1      2024-02-14 [1] RSPM (R 4.3.0)
 ggfortify            * 0.4.17     2024-04-17 [1] RSPM (R 4.3.0)
 ggplot2              * 3.5.0      2024-02-23 [1] CRAN (R 4.3.0)
 ggpubr               * 0.6.0.999  2025-02-14 [1] Github (kassambara/ggpubr@6aeb4f7)
 ggrepel                0.9.3      2023-02-03 [1] RSPM (R 4.3.0)
 ggridges               0.5.4      2022-09-26 [1] RSPM (R 4.3.0)
 ggsignif               0.6.4      2022-10-13 [1] RSPM (R 4.3.0)
 ggstats                0.8.0      2025-01-07 [1] RSPM (R 4.3.0)
 glmGamPoi            * 1.12.2     2023-07-02 [1] Bioconductor
 GlobalOptions          0.1.2      2020-06-10 [1] RSPM (R 4.3.0)
 globals                0.16.2     2022-11-21 [1] RSPM (R 4.3.0)
 glue                   1.6.2      2022-02-24 [1] RSPM (R 4.3.0)
 goftest                1.2-3      2021-10-07 [1] RSPM (R 4.3.0)
 gridExtra              2.3        2017-09-09 [1] RSPM (R 4.3.0)
 gtable                 0.3.3      2023-03-21 [1] RSPM (R 4.3.0)
 harmony              * 1.2.3      2024-11-27 [1] RSPM (R 4.3.0)
 hms                    1.1.3      2023-03-21 [1] RSPM (R 4.3.0)
 htmltools              0.5.5      2023-03-23 [1] RSPM (R 4.3.0)
 htmlwidgets            1.6.2      2023-03-17 [1] RSPM (R 4.3.0)
 httpuv                 1.6.9      2023-02-14 [1] RSPM (R 4.3.0)
 httr                   1.4.6      2023-05-08 [1] RSPM (R 4.3.0)
 ica                    1.0-3      2022-07-08 [1] RSPM (R 4.3.0)
 igraph                 1.4.2      2023-04-07 [1] RSPM (R 4.3.0)
 IRanges                2.34.0     2023-04-25 [1] Bioconductor
 irlba                  2.3.5.1    2022-10-03 [1] RSPM (R 4.3.0)
 iterators              1.0.14     2022-02-05 [1] RSPM (R 4.3.0)
 jsonlite               1.8.4      2022-12-06 [1] RSPM (R 4.3.0)
 KernSmooth             2.23-20    2021-05-03 [2] CRAN (R 4.3.0)
 knitr                * 1.42       2023-01-25 [1] RSPM (R 4.3.0)
 later                  1.3.0      2021-08-18 [1] RSPM (R 4.3.0)
 lattice                0.21-8     2023-04-05 [2] CRAN (R 4.3.0)
 lazyeval               0.2.2      2019-03-15 [1] RSPM (R 4.3.0)
 lifecycle              1.0.3      2022-10-07 [1] RSPM (R 4.3.0)
 listenv                0.9.0      2022-12-16 [1] RSPM (R 4.3.0)
 lmtest                 0.9-40     2022-03-21 [1] RSPM (R 4.3.0)
 lubridate            * 1.9.2      2023-02-10 [1] RSPM (R 4.3.0)
 magrittr               2.0.3      2022-03-30 [1] RSPM (R 4.3.0)
 MASS                   7.3-59     2023-04-21 [2] RSPM (R 4.3.0)
 Matrix                 1.6-5      2024-01-11 [1] CRAN (R 4.3.0)
 MatrixGenerics         1.12.0     2023-04-25 [1] Bioconductor
 matrixStats            0.63.0     2022-11-18 [1] RSPM (R 4.3.0)
 memoise                2.0.1      2021-11-26 [1] RSPM (R 4.3.0)
 mime                   0.12       2021-09-28 [1] RSPM (R 4.3.0)
 miniUI                 0.1.1.1    2018-05-18 [1] RSPM (R 4.3.0)
 munsell                0.5.0      2018-06-12 [1] RSPM (R 4.3.0)
 nlme                   3.1-162    2023-01-31 [2] CRAN (R 4.3.0)
 openxlsx             * 4.2.8      2025-02-17 [1] Github (ycphs/openxlsx@9b094b9)
 parallelly             1.35.0     2023-03-23 [1] RSPM (R 4.3.0)
 patchwork              1.3.0.9000 2025-02-13 [1] Github (thomasp85/patchwork@2695a9f)
 pbapply                1.7-0      2023-01-13 [1] RSPM (R 4.3.0)
 pillar                 1.9.0      2023-03-22 [1] RSPM (R 4.3.0)
 pkgbuild               1.4.0      2022-11-27 [1] RSPM (R 4.3.0)
 pkgconfig              2.0.3      2019-09-22 [1] RSPM (R 4.3.0)
 pkgload                1.3.2      2022-11-16 [1] RSPM (R 4.3.0)
 plotly                 4.10.1     2022-11-07 [1] RSPM (R 4.3.0)
 plyr                   1.8.8      2022-11-11 [1] RSPM (R 4.3.0)
 png                    0.1-8      2022-11-29 [1] RSPM (R 4.3.0)
 PNWColors            * 0.1.0      2025-02-18 [1] Github (jakelawlor/PNWColors@f16a14f)
 polyclip               1.10-4     2022-10-20 [1] RSPM (R 4.3.0)
 presto               * 1.0.0      2025-02-05 [1] Github (immunogenomics/presto@7636b3d)
 prettyunits            1.1.1      2020-01-24 [1] RSPM (R 4.3.0)
 processx               3.8.1      2023-04-18 [1] RSPM (R 4.3.0)
 profvis                0.3.7      2020-11-02 [1] RSPM (R 4.3.0)
 progressr              0.13.0     2023-01-10 [1] RSPM (R 4.3.0)
 promises               1.2.0.1    2021-02-11 [1] RSPM (R 4.3.0)
 ps                     1.7.5      2023-04-18 [1] RSPM (R 4.3.0)
 purrr                * 1.0.1      2023-01-10 [1] RSPM (R 4.3.0)
 R6                     2.5.1      2021-08-19 [1] RSPM (R 4.3.0)
 RANN                   2.6.1      2019-01-08 [1] RSPM (R 4.3.0)
 RColorBrewer         * 1.1-3      2022-04-03 [1] RSPM (R 4.3.0)
 Rcpp                 * 1.0.10     2023-01-22 [1] RSPM (R 4.3.0)
 RcppAnnoy              0.0.20     2022-10-27 [1] RSPM (R 4.3.0)
 RcppHNSW               0.4.1      2022-07-18 [1] RSPM (R 4.3.0)
 RCurl                  1.98-1.12  2023-03-27 [1] RSPM (R 4.3.0)
 readr                * 2.1.4      2023-02-10 [1] RSPM (R 4.3.0)
 remotes                2.4.2      2021-11-30 [1] RSPM (R 4.3.0)
 reshape2             * 1.4.4      2020-04-09 [1] RSPM (R 4.3.0)
 reticulate             1.28       2023-01-27 [1] RSPM (R 4.3.0)
 rjson                  0.2.21     2022-01-09 [1] RSPM (R 4.3.0)
 rlang                  1.1.1      2023-04-28 [1] RSPM (R 4.3.0)
 rmarkdown              2.21       2023-03-26 [1] RSPM (R 4.3.0)
 ROCR                   1.0-11     2020-05-02 [1] RSPM (R 4.3.0)
 RSpectra               0.16-2     2024-07-18 [1] RSPM (R 4.3.0)
 rstatix                0.7.2      2023-02-01 [1] RSPM (R 4.3.0)
 rstudioapi             0.14       2022-08-22 [1] RSPM (R 4.3.0)
 rsvd                 * 1.0.5      2021-04-16 [1] RSPM (R 4.3.0)
 Rtsne                  0.16       2022-04-17 [1] RSPM (R 4.3.0)
 S4Arrays               1.0.4      2023-05-14 [1] Bioconductor
 S4Vectors              0.38.1     2023-05-02 [1] Bioconductor
 scales                 1.3.0      2023-11-28 [1] RSPM (R 4.3.0)
 scattermore            1.2        2023-06-12 [1] RSPM (R 4.3.0)
 sctransform            0.4.1      2023-10-19 [1] RSPM (R 4.3.0)
 sessioninfo            1.2.2      2021-12-06 [1] RSPM (R 4.3.0)
 Seurat               * 5.2.1      2025-01-24 [1] RSPM (R 4.3.0)
 SeuratObject         * 5.0.2      2024-05-08 [1] RSPM (R 4.3.0)
 shape                  1.4.6.1    2024-02-23 [1] RSPM (R 4.3.0)
 shiny                  1.7.4      2022-12-15 [1] RSPM (R 4.3.0)
 sp                   * 1.6-0      2023-01-19 [1] RSPM (R 4.3.0)
 spam                   2.11-1     2025-01-20 [1] RSPM (R 4.3.0)
 spatstat.data          3.0-1      2023-03-12 [1] RSPM (R 4.3.0)
 spatstat.explore       3.1-0      2023-03-14 [1] RSPM (R 4.3.0)
 spatstat.geom          3.1-0      2023-03-12 [1] RSPM (R 4.3.0)
 spatstat.random        3.1-4      2023-03-13 [1] RSPM (R 4.3.0)
 spatstat.sparse        3.0-1      2023-03-12 [1] RSPM (R 4.3.0)
 spatstat.utils         3.1-2      2025-01-08 [1] RSPM (R 4.3.0)
 stringi                1.7.12     2023-01-11 [1] RSPM (R 4.3.0)
 stringr              * 1.5.0      2022-12-02 [1] RSPM (R 4.3.0)
 SummarizedExperiment   1.30.1     2023-05-01 [1] Bioconductor
 survival               3.5-5      2023-03-12 [2] CRAN (R 4.3.0)
 tensor                 1.5        2012-05-05 [1] RSPM (R 4.3.0)
 tibble               * 3.2.1      2023-03-20 [1] RSPM (R 4.3.0)
 tidyr                * 1.3.0      2023-01-24 [1] RSPM (R 4.3.0)
 tidyselect             1.2.0      2022-10-10 [1] RSPM (R 4.3.0)
 tidyverse            * 2.0.0      2023-02-22 [1] RSPM (R 4.3.0)
 timechange             0.2.0      2023-01-11 [1] RSPM (R 4.3.0)
 tzdb                   0.3.0      2022-03-28 [1] RSPM (R 4.3.0)
 urlchecker             1.0.1      2021-11-30 [1] RSPM (R 4.3.0)
 usethis                2.1.6      2022-05-25 [1] RSPM (R 4.3.0)
 utf8                   1.2.3      2023-01-31 [1] RSPM (R 4.3.0)
 uwot                   0.1.14     2022-08-22 [1] RSPM (R 4.3.0)
 vctrs                  0.6.2      2023-04-19 [1] RSPM (R 4.3.0)
 viridisLite            0.4.1      2022-08-22 [1] RSPM (R 4.3.0)
 withr                  2.5.0      2022-03-03 [1] RSPM (R 4.3.0)
 xfun                   0.39       2023-04-20 [1] RSPM (R 4.3.0)
 xtable                 1.8-4      2019-04-21 [1] RSPM (R 4.3.0)
 XVector                0.40.0     2023-04-25 [1] Bioconductor
 yaml                   2.3.7      2023-01-23 [1] RSPM (R 4.3.0)
 zip                    2.3.0      2023-04-17 [1] RSPM (R 4.3.0)
 zlibbioc               1.46.0     2023-04-25 [1] Bioconductor
 zoo                    1.8-12     2023-04-13 [1] RSPM (R 4.3.0)

Thank you for your help!

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

1 participant