satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.31k stars 919 forks source link

Error when running RunUMAP #5501

Closed zqsha closed 2 years ago

zqsha commented 2 years ago

When I'm trying to run UMAP for a dataset that is SCTranformed, I had error saying Warning: The following arguments are not used: drop Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'type': unused argument (drop = FALSE)

I used the following code and got the error described above maple_seurat <- SCTransform(maple_seurat, assay = "originalexp", verbose = FALSE) maple_seurat <- RunPCA(maple_seurat) maple_seurat <- runUMAP(maple_seurat, reduction="pca")

I heard this issue can be fixed by updating the SeuratDisk and sctransform. But after updating these toolboxes, this error remains. Here is the sessionInfo from my side. Any thoughts on fixing it? Thank you so much

> sessionInfo('SeuratDisk')
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.0

Matrix products: default
BLAS:   /usr/shared/apps/R/R-4.0.3/lib64/R/lib/libRblas.so
LAPACK: /usr/shared/apps/R/R-4.0.3/lib64/R/lib/libRlapack.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:
character(0)

other attached packages:
[1] SeuratDisk_0.0.0.9019

loaded via a namespace (and not attached):
 [1] processx_3.5.2    compiler_4.0.3    R6_2.5.1          rprojroot_2.0.2
 [5] cli_3.1.0         graphics_4.0.3    prettyunits_1.1.1 tools_4.0.3
 [9] withr_2.4.3       utils_4.0.3       curl_4.3.2        grDevices_4.0.3
[13] crayon_1.4.2      remotes_2.4.2     stats_4.0.3       datasets_4.0.3
[17] callr_3.7.0       methods_4.0.3     pkgbuild_1.3.1    ps_1.6.0
[21] base_4.0.3
> sessionInfo('Seurat')
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.0

Matrix products: default
BLAS:   /usr/shared/apps/R/R-4.0.3/lib64/R/lib/libRblas.so
LAPACK: /usr/shared/apps/R/R-4.0.3/lib64/R/lib/libRlapack.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:
character(0)

other attached packages:
[1] Seurat_4.0.6

loaded via a namespace (and not attached):
 [1] processx_3.5.2    compiler_4.0.3    R6_2.5.1          rprojroot_2.0.2
 [5] cli_3.1.0         graphics_4.0.3    prettyunits_1.1.1 tools_4.0.3
 [9] withr_2.4.3       utils_4.0.3       curl_4.3.2        grDevices_4.0.3
[13] crayon_1.4.2      remotes_2.4.2     stats_4.0.3       datasets_4.0.3
[17] callr_3.7.0       methods_4.0.3     pkgbuild_1.3.1    ps_1.6.0
[21] base_4.0.3

> sessionInfo('sctransform')
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.0

Matrix products: default
BLAS:   /usr/shared/apps/R/R-4.0.3/lib64/R/lib/libRblas.so
LAPACK: /usr/shared/apps/R/R-4.0.3/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
character(0)

other attached packages:
[1] sctransform_0.3.2

loaded via a namespace (and not attached):
  [1] rsvd_1.0.5                    ica_1.0-2                     class_7.3-17                  ps_1.6.0                     
  [5] Rsamtools_2.6.0               foreach_1.5.1                 lmtest_0.9-39                 rprojroot_2.0.2              
  [9] crayon_1.4.2                  spatstat.core_2.3-2           MASS_7.3-53                   nlme_3.1-149                 
 [13] backports_1.4.1               reprex_2.0.1                  BayesLogit_2.1                rlang_0.4.12                 
 [17] caret_6.0-90                  XVector_0.30.0                ROCR_1.0-11                   readxl_1.3.1                 
 [21] SparseM_1.81                  irlba_2.3.5                   callr_3.7.0                   limma_3.46.0                 
 [25] scater_1.18.6                 base_4.0.3                    BiocParallel_1.24.1           rjson_0.2.20                 
 [29] bit64_4.0.5                   harmony_0.1.0                 glue_1.6.0                    pheatmap_1.0.12              
 [33] parallel_4.0.3                processx_3.5.2                vipor_0.4.5                   SeuratDisk_0.0.0.9019        
 [37] spatstat.sparse_2.1-0         AnnotationDbi_1.52.0          BiocGenerics_0.36.1           dotCall64_1.0-1              
 [41] stxBrain.SeuratData_0.1.1     spatstat.geom_2.3-1           mcmc_0.9-7                    haven_2.4.3                  
 [45] tidyselect_1.1.1              SummarizedExperiment_1.20.0   usethis_2.1.5                 SeuratObject_4.0.4           
 [49] fitdistrplus_1.1-6            attempt_0.3.1                 XML_3.99-0.5                  tidyr_1.1.4                  
 [53] zoo_1.8-9                     GenomicAlignments_1.26.0      MatrixModels_0.5-0            xtable_1.8-4                 
 [57] magrittr_2.0.1                ggplot2_3.3.5                 scuttle_1.0.4                 cli_3.1.0                    
 [61] zlibbioc_1.36.0               rstudioapi_0.13               miniUI_0.1.1.1                bslib_0.3.1                  
 [65] bmp_0.3                       rpart_4.1-15                  rafalib_1.0.0                 spruce_0.99.0                
 [69] maps_3.4.0                    fields_13.3                   shiny_1.7.1                   BiocSingular_1.6.0           
 [73] xfun_0.29                     pkgbuild_1.3.1                cluster_2.1.0                 tibble_3.0.4                 
 [77] interactiveDisplayBase_1.28.0 quantreg_5.86                 ggrepel_0.9.1                 listenv_0.8.0                
 [81] shinyWidgets_0.6.2            Biostrings_2.58.0             png_0.1-7                     future_1.23.0                
 [85] ipred_0.9-12                  withr_2.4.3                   bitops_1.0-7                  ggforce_0.3.3                
 [89] plyr_1.8.6                    cellranger_1.1.0              dockerfiler_0.1.4             pROC_1.18.0                  
 [93] dqrng_0.3.0                   SeuratData_0.2.1              coda_0.19-4                   pillar_1.6.4                 
 [97] cachem_1.0.6                  utils_4.0.3                   fs_1.5.2                      scatterplot3d_0.3-41         
[101] hdf5r_1.3.3                   tidyverse_1.3.1               graphics_4.0.3                DelayedMatrixStats_1.12.3    
[105] vctrs_0.3.8                   ellipsis_0.3.2                generics_0.1.1                lava_1.6.10                  
[109] tools_4.0.3                   beeswarm_0.4.0                munsell_0.5.0                 tweenr_1.0.2                 
[113] DelayedArray_0.16.3           fastmap_1.1.0                 compiler_4.0.3                pkgload_1.2.4                
[117] abind_1.4-5                   httpuv_1.6.4                  rtracklayer_1.50.0            segmented_1.3-4              
[121] ExperimentHub_1.16.1          sessioninfo_1.2.2             plotly_4.10.0                 prodlim_2019.11.13           
[125] GenomeInfoDbData_1.2.4        gridExtra_2.3                 MCMCpack_1.6-0                roxygen2_7.1.2               
[129] edgeR_3.32.1                  lattice_0.20-41               deldir_1.0-6                  utf8_1.2.2                   
[133] later_1.3.0                   dplyr_1.0.7                   recipes_0.1.17                BiocFileCache_1.14.0         
[137] jsonlite_1.7.2                scales_1.1.1                  datasets_4.0.3                pbapply_1.5-0                
[141] sparseMatrixStats_1.2.1       lazyeval_0.2.2                promises_1.2.0.1              doParallel_1.0.16            
[145] goftest_1.2-3                 spatstat.utils_2.3-0          reticulate_1.22               cowplot_1.1.1                
[149] statmod_1.4.36                Rtsne_0.15                    forcats_0.5.1                 Biobase_2.50.0               
[153] uwot_0.1.11                   igraph_1.2.6                  survival_3.2-7                yaml_2.2.1                   
[157] stats_4.0.3                   htmltools_0.5.2               memoise_2.0.1                 Seurat_4.0.6                 
[161] locfit_1.5-9.4                IRanges_2.24.1                PCAtools_2.2.0                viridisLite_0.4.0            
[165] digest_0.6.29                 assertthat_0.2.1              mime_0.12                     rappdirs_0.3.3               
[169] tiff_0.1-10                   spam_2.7-0                    RSQLite_2.2.9                 future.apply_1.8.1           
[173] Rmisc_1.5                     jaffelab_0.99.30              remotes_2.4.2                 data.table_1.14.2            
[177] blob_1.2.2                    S4Vectors_0.28.1              splines_4.0.3                 googledrive_2.0.0            
[181] AnnotationHub_2.22.1          benchmarkme_1.0.7             RCurl_1.98-1.2                broom_0.7.10                 
[185] hms_1.1.1                     modelr_0.1.8                  colorspace_2.0-2              BiocManager_1.30.16          
[189] ggbeeswarm_0.6.0              GenomicRanges_1.42.0          nnet_7.3-14                   sass_0.4.0                   
[193] Rcpp_1.0.7                    RANN_2.6.1                    mvtnorm_1.1-3                 fansi_0.5.0                  
[197] conquer_1.2.1                 tzdb_0.2.0                    truncnorm_1.0-8               ModelMetrics_1.2.2.2         
[201] parallelly_1.30.0             R6_2.5.1                      grid_4.0.3                    ggridges_0.5.3               
[205] lifecycle_1.0.1               bluster_1.0.0                 curl_4.3.2                    leiden_0.3.9                 
[209] testthat_3.1.1                jquerylib_0.1.4               SpatialExperiment_1.0.0       benchmarkmeData_1.0.4        
[213] Matrix_1.4-0                  spatialLIBD_1.2.1             desc_1.4.0                    config_0.3.1                 
[217] RcppAnnoy_0.0.19              RColorBrewer_1.1-2            iterators_1.0.13              gower_0.2.2                  
[221] stringr_1.4.0                 htmlwidgets_1.5.4             beachmat_2.6.4                polyclip_1.10-0              
[225] purrr_0.3.4                   rvest_1.0.2                   mgcv_1.8-33                   dbarts_0.9-20                
[229] globals_0.14.0                readbitmap_0.1.5              methods_4.0.3                 patchwork_1.1.1              
[233] codetools_0.2-16              grDevices_4.0.3               matrixStats_0.61.0            lubridate_1.8.0              
[237] prettyunits_1.1.1             SingleCellExperiment_1.12.0   dbplyr_2.1.1                  GenomeInfoDb_1.26.7          
[241] gtable_0.3.0                  DBI_1.1.2                     ggalluvial_0.12.3             stats4_4.0.3                 
[245] Polychrome_1.3.1              tensor_1.5                    httr_1.4.2                    KernSmooth_2.23-17           
[249] stringi_1.7.6                 reshape2_1.4.4                farver_2.1.0                  viridis_0.6.2                
[253] timeDate_3043.102             maple_0.99.1                  DT_0.20                       xml2_1.3.2                   
[257] BiocNeighbors_1.8.2           readr_2.1.1                   golem_0.3.1                   scattermore_0.7              
[261] BiocVersion_3.12.0            scran_1.18.7                  bit_4.0.4                     jpeg_0.1-9                   
[265] MatrixGenerics_1.2.1          spatstat.data_2.1-2           pkgconfig_2.0.3               gargle_1.2.0                 
[269] knitr_1.37   ```
saketkc commented 2 years ago

I think you are using runUMAP from the scater package. It should be RunUMAP:

pbmc_small <- scater::runUMAP(pbmc_small) # this is incorrect
Warning: The following arguments are not used: drop
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'type': unused argument (drop = FALSE)
pbmc_small <- RunUMAP(pbmc_small) # correct