stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
328 stars 88 forks source link

max(nu, nv) must be strictly less than min(nrow(A), ncol(A)) #974

Closed YangLi-Bio closed 2 years ago

YangLi-Bio commented 2 years ago

Hi Tim,

I am trying to perform dimension reduction and joint clustering using Seurat by following the vignette in https://satijalab.org/seurat/articles/weighted_nearest_neighbor_analysis.html#wnn-analysis-of-10x-multiome-rna-atac-1. However, I got the following error when running the function "RunSVD". The numbers of peaks and cells in this dataset are 35163 and 397.

Could you please help me find the reason?

The error message is: Running SVD Error in irlba(A = t(x = object), nv = n, work = irlba.work) : max(nu, nv) must be strictly less than min(nrow(A), ncol(A))

The dataset used in my project is in Google Drive.

The output of sessionInfo() is: `R version 4.0.2 (2020-06-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /opt/intel/19.0.5/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_gf_lp64.so

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

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

other attached packages: [1] BSgenome.Mmusculus.UCSC.mm9_1.4.0 org.Mm.eg.db_3.12.0 BSgenome.Mmusculus.UCSC.mm10_1.4.0 [4] EnsDb.Mmusculus.v75_2.99.0 org.Hs.eg.db_3.12.0 BSgenome.Hsapiens.UCSC.hg38_1.4.3 [7] EnsDb.Hsapiens.v86_2.99.0 ensembldb_2.14.1 AnnotationFilter_1.14.0
[10] GenomicFeatures_1.42.3 presto_1.0.0 Rcpp_1.0.8
[13] clusterProfiler_3.18.1 biomaRt_2.46.3 scater_1.18.6
[16] AnnotationDbi_1.52.0 pbmcapply_1.5.0 qs_0.25.1.1
[19] beepr_1.3 qualV_0.3-4 KernSmooth_2.23-20
[22] BSgenome_1.58.0 rtracklayer_1.50.0 Biostrings_2.58.0
[25] XVector_0.30.0 hash_2.2.6.1 patchwork_1.1.1
[28] forcats_0.5.1 stringr_1.4.0 purrr_0.3.4
[31] readr_2.1.0 tidyr_1.1.4 tibble_3.1.6
[34] tidyverse_1.3.1 ggplot2_3.3.5 dplyr_1.0.7
[37] JASPAR2020_0.99.10 igraph_1.2.9 data.table_1.14.2
[40] qlcMatrix_0.9.7 sparsesvd_0.2 slam_0.1-49
[43] Matrix_1.3-4 cicero_1.3.4.11 Gviz_1.34.1
[46] monocle3_1.0.0 SingleCellExperiment_1.12.0 SummarizedExperiment_1.20.0
[49] GenomicRanges_1.42.0 GenomeInfoDb_1.31.4 IRanges_2.24.1
[52] S4Vectors_0.28.1 MatrixGenerics_1.2.1 matrixStats_0.61.0-9001
[55] Biobase_2.50.0 BiocGenerics_0.41.2 pbapply_1.5-0
[58] future.apply_1.8.1 future_1.23.0 IRISFGM_0.99.1
[61] Signac_1.4.0 SeuratObject_4.0.3 Seurat_4.0.5
[64] optparse_1.7.1

loaded via a namespace (and not attached): [1] rsvd_1.0.5 Hmisc_4.6-0 ica_1.0-2 RcppRoll_0.3.0
[5] Rsamtools_2.6.0 lmtest_0.9-39 crayon_1.4.2 spatstat.core_2.3-2
[9] MASS_7.3-54 nlme_3.1-153 backports_1.4.0 reprex_2.0.1
[13] GOSemSim_2.16.1 rlang_0.4.12 readxl_1.3.1 ROCR_1.0-11
[17] irlba_2.3.3 limma_3.46.0 stringfish_0.15.4 BiocParallel_1.24.1
[21] bit64_4.0.5 glue_1.5.0 pheatmap_1.0.12 sctransform_0.3.2
[25] vipor_0.4.5 spatstat.sparse_2.0-0 DOSE_3.16.0 spatstat.geom_2.3-0
[29] VGAM_1.1-5 haven_2.4.3 tidyselect_1.1.1 DrImpute_1.0
[33] fitdistrplus_1.1-6 XML_3.99-0.8 DEsingle_1.10.0 zoo_1.8-9
[37] ggpubr_0.4.0 GenomicAlignments_1.26.0 xtable_1.8-4 magrittr_2.0.1
[41] cli_3.1.0 scuttle_1.0.4 zlibbioc_1.36.0 rstudioapi_0.13
[45] miniUI_0.1.1.1 rpart_4.1-15 fastmatch_1.1-3 shiny_1.7.1
[49] BiocSingular_1.6.0 xfun_0.28 askpass_1.1 cluster_2.1.2
[53] tidygraph_1.2.0 expm_0.999-6 ggrepel_0.9.1 biovizBase_1.38.0
[57] listenv_0.8.0 png_0.1-7 withr_2.4.2 lsa_0.73.2
[61] bitops_1.0-7 ggforce_0.3.3 cellranger_1.1.0 plyr_1.8.6
[65] pracma_2.3.3 dqrng_0.3.0 RcppParallel_5.1.4 pillar_1.6.4
[69] cachem_1.0.6 pscl_1.5.5 fs_1.5.0 kernlab_0.9-29
[73] scatterplot3d_0.3-41 DelayedMatrixStats_1.12.3 gamlss.data_6.0-2 vctrs_0.3.8
[77] ellipsis_0.3.2 generics_0.1.1 RApiSerialize_0.1.0 tools_4.0.2
[81] foreign_0.8-81 beeswarm_0.4.0 munsell_0.5.0 tweenr_1.0.2
[85] fgsea_1.16.0 DelayedArray_0.16.3 fastmap_1.1.0 compiler_4.0.2
[89] abind_1.4-5 httpuv_1.5.4 segmented_1.3-4 plotly_4.10.0
[93] GenomeInfoDbData_1.2.7 gridExtra_2.3 edgeR_3.32.1 lattice_0.20-45
[97] deldir_1.0-6 utf8_1.2.2 later_1.3.0 BiocFileCache_1.14.0
[101] jsonlite_1.7.2 scales_1.1.1 docopt_0.7.1 carData_3.0-4
[105] sparseMatrixStats_1.2.1 lazyeval_0.2.2 promises_1.2.0.1 car_3.0-12
[109] latticeExtra_0.6-29 goftest_1.2-3 checkmate_2.0.0 spatstat.utils_2.2-0
[113] reticulate_1.22 sandwich_3.0-1 cowplot_1.1.1 statmod_1.4.36
[117] Rtsne_0.15 dichromat_2.0-0 downloader_0.4 uwot_0.1.10
[121] survival_3.2-13 numDeriv_2016.8-1.1 htmltools_0.5.2 memoise_2.0.1
[125] VariantAnnotation_1.36.0 locfit_1.5-9.4 graphlayouts_0.7.2 viridisLite_0.4.0
[129] digest_0.6.28 assertthat_0.2.1 mime_0.12 rappdirs_0.3.3
[133] RSQLite_2.2.8 yulab.utils_0.0.4 blob_1.2.2 MCL_1.0
[137] splines_4.0.2 Formula_1.2-4 ProtGenerics_1.22.0 mixtools_1.2.0
[141] RCurl_1.98-1.5 broom_0.7.10 hms_1.1.1 modelr_0.1.8
[145] colorspace_2.0-2 base64enc_0.1-3 BiocManager_1.30.16 ggbeeswarm_0.6.0
[149] anocva_0.1.1 maxLik_1.5-2 nnet_7.3-16 RANN_2.6.1
[153] audio_0.1-10 mvtnorm_1.1-3 enrichplot_1.10.2 ggseqlogo_0.1
[157] fansi_0.5.0 tzdb_0.2.0 parallelly_1.29.0 SnowballC_0.7.0
[161] R6_2.5.1 ggridges_0.5.3 lifecycle_1.0.1 bluster_1.0.0
[165] miscTools_0.6-26 curl_4.3.2 ggsignif_0.6.3 leiden_0.3.9
[169] getopt_1.20.3 DO.db_2.9 AdaptGauss_1.5.6 qvalue_2.22.0
[173] RcppAnnoy_0.0.19 RColorBrewer_1.1-2 htmlwidgets_1.5.4 beachmat_2.6.4
[177] polyclip_1.10-0 shadowtext_0.0.9 gamlss_5.3-4 rvest_1.0.2
[181] mgcv_1.8-38 globals_0.14.0 openssl_1.4.5 htmlTable_2.3.0
[185] bdsmatrix_1.3-4 lubridate_1.8.0 codetools_0.2-18 GO.db_3.12.1
[189] prettyunits_1.1.1 dbplyr_2.1.1 RSpectra_0.16-0 gtable_0.3.0
[193] DBI_1.1.1 Polychrome_1.3.1 ggfun_0.0.4 tensor_1.5
[197] httr_1.4.2 stringi_1.7.6 progress_1.2.2 reshape2_1.4.4
[201] farver_2.1.0 viridis_0.6.2 xml2_1.3.2 rvcheck_0.2.1
[205] bbmle_1.0.24 BiocNeighbors_1.8.2 scattermore_0.7 scran_1.18.7
[209] bit_4.0.4 scatterpie_0.1.7 jpeg_0.1-9 spatstat.data_2.1-0
[213] ggraph_2.0.5 pkgconfig_2.0.3 gamlss.dist_6.0-1 rstatix_0.7.0
[217] knitr_1.36 `

My codes are as follows.

library(Seurat)
pbmc <- readRDS("ASTAR_seq_Human_CB.RDS")
DefaultAssay(pbmc) <- "ATAC"
pbmc <- RunSVD(pbmc)
timoast commented 2 years ago

You need to run FindTopFeatures() and RunTFIDF() before RunSVD()

YangLi-Bio commented 2 years ago

You need to run FindTopFeatures() and RunTFIDF() before RunSVD()

Got it. Thanks! These files were processed in batch. This file was missed for preprocessing.

Thank you