satijalab / seurat

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

Cannot load PBMC dataset #9026

Closed mattmccravy closed 1 week ago

mattmccravy commented 2 weeks ago

After loading Seurat v5 and setting what I think is the appropriate directory, I cannot link to the PBMC dataset.

sessionInfo() R version 4.4.0 (2024-04-24 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York tzcode source: internal

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

other attached packages: [1] patchwork_1.2.0 Seurat_5.1.0 SeuratObject_5.0.2 sp_2.1-4
[5] dplyr_1.1.4

loaded via a namespace (and not attached): [1] deldir_2.0-4 pbapply_1.7-2 gridExtra_2.3
[4] remotes_2.5.0 rlang_1.1.4 magrittr_2.0.3
[7] RcppAnnoy_0.0.22 matrixStats_1.3.0 ggridges_0.5.6
[10] compiler_4.4.0 spatstat.geom_3.2-9 png_0.1-8
[13] vctrs_0.6.5 reshape2_1.4.4 stringr_1.5.1
[16] pkgconfig_2.0.3 fastmap_1.2.0 utf8_1.2.4
[19] promises_1.3.0 purrr_1.0.2 jsonlite_1.8.8
[22] goftest_1.2-3 later_1.3.2 spatstat.utils_3.0-4
[25] irlba_2.3.5.1 parallel_4.4.0 cluster_2.1.6
[28] R6_2.5.1 ica_1.0-3 stringi_1.8.4
[31] RColorBrewer_1.1-3 spatstat.data_3.0-4 reticulate_1.37.0
[34] parallelly_1.37.1 lmtest_0.9-40 scattermore_1.2
[37] Rcpp_1.0.12 tensor_1.5 future.apply_1.11.2
[40] zoo_1.8-12 R.utils_2.12.3 sctransform_0.4.1
[43] httpuv_1.6.15 Matrix_1.7-0 splines_4.4.0
[46] igraph_2.0.3 tidyselect_1.2.1 abind_1.4-5
[49] spatstat.random_3.2-3 codetools_0.2-20 miniUI_0.1.1.1
[52] spatstat.explore_3.2-7 curl_5.2.1 listenv_0.9.1
[55] lattice_0.22-6 tibble_3.2.1 plyr_1.8.9
[58] shiny_1.8.1.1 ROCR_1.0-11 Rtsne_0.17
[61] future_1.33.2 fastDummies_1.7.3 survival_3.5-8
[64] polyclip_1.10-6 fitdistrplus_1.1-11 pillar_1.9.0
[67] KernSmooth_2.23-22 plotly_4.10.4 generics_0.1.3
[70] RcppHNSW_0.6.0 ggplot2_3.5.1 munsell_0.5.1
[73] scales_1.3.0 globals_0.16.3 xtable_1.8-4
[76] glue_1.7.0 lazyeval_0.2.2 tools_4.4.0
[79] data.table_1.15.4 RSpectra_0.16-1 RANN_2.6.1
[82] leiden_0.4.3.1 dotCall64_1.1-1 cowplot_1.1.3
[85] grid_4.4.0 tidyr_1.3.1 colorspace_2.1-0
[88] nlme_3.1-164 cli_3.6.2 spatstat.sparse_3.0-3 [91] spam_2.10-0 fansi_1.0.6 viridisLite_0.4.2
[94] uwot_0.2.2 gtable_0.3.5 R.methodsS3_1.8.2
[97] digest_0.6.35 progressr_0.14.0 ggrepel_0.9.5
[100] htmlwidgets_1.6.4 R.oo_1.26.0 htmltools_0.5.8.1
[103] lifecycle_1.0.4 httr_1.4.7 mime_0.12
[106] MASS_7.3-60.2

# insert reproducible example here
> setRepositories(ind = 1:3, addURLs = c('https://satijalab.r-universe.dev', 'https://bnprks.r-universe.dev/')) > # Load the PBMC dataset > pbmc.data <- Read10X(data.dir = "/brahms/mollag/practice/filtered_gene_bc_matrices/hg19/") Error in Read10X(data.dir = "/brahms/mollag/practice/filtered_gene_bc_matrices/hg19/") : Directory provided does not exist > # Load the PBMC dataset > pbmc.data <- Read10X_h5(data.dir = "/brahms/mollag/practice/filtered_gene_bc_matrices/hg19/") Error in Read10X_h5(data.dir = "/brahms/mollag/practice/filtered_gene_bc_matrices/hg19/") : unused argument (data.dir = "/brahms/mollag/practice/filtered_gene_bc_matrices/hg19/") --  
zskylarli commented 1 week ago

Hi - could you please run library(SeuratData) first before installing pbmc if you haven't already, with InstallData('pbmc3k'), and then load it in with pbmc <- LoadData('pbmc3k')? You will not be able to load the dataset with that given code since it points to our internal server. Please feel free to reopen if you encounter further issues!

LukeStarWars commented 1 week ago

I am having the same issue loading the PBMC dataset: Error in Read10X(data.dir = "/brahms/mollag/practice/filtered_gene_bc_matrices/hg19/") : Directory provided does not exist

I followed the lines outlined by zskylarli but the issue persists.

mattmccravy commented 1 week ago

LukeStarWars, were you able to load SeuratData? It is not in CRAN and you need to use the following command to install it.

devtools::install_github('satijalab/seurat-data')

After intalling SeuratData I was able to execute the following code

library(SeuratData) InstallData('pbmc3k') Installing package into ‘C:/Users/msm123/AppData/Local/R/win-library/4.4’ (as ‘lib’ is unspecified) trying URL 'http://seurat.nygenome.org/src/contrib/pbmc3k.SeuratData_3.1.4.tar.gz' Content type 'application/octet-stream' length 93780025 bytes (89.4 MB) downloaded 89.4 MB

The downloaded source packages are in ‘C:\Users\msm123\AppData\Local\Temp\RtmpuS0Rmi\downloaded_packages’

pbmc <- LoadData('pbmc3k') Validating object structure Updating object slots Ensuring keys are in the proper structure Warning: Assay RNA changing from Assay to Assay Ensuring keys are in the proper structure Ensuring feature names don't have underscores or pipes Updating slots in RNA Validating object structure for Assay ‘RNA’ Object representation is consistent with the most current Seurat version Warning: Assay RNA changing from Assay to Assay5