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

as.Seurat error converting sce with ?more recent CellRanger and CellBender .h5 files #4353

Closed
JTpath opened this issue Apr 12, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@JTpath
Copy link

JTpath commented Apr 12, 2021

Hi, I've been working with h5 files from cellbender on 10x data.

Previously I had no trouble going to and from single cell experiment format, but for the last few days I've been getting this error.

'Error in .subset2(x, i, exact = exact) : subscript out of bounds'

Converting pbmc_small to and from sce works fine, but data from the new v6 cellranger on the 10x website gives the same error (https://cf.10xgenomics.com/samples/cell-exp/6.0.0/Brain_3p_LT/Brain_3p_LT_filtered_feature_bc_matrix.h5)

Please help.
Thanks

library(Seurat)
#> Registered S3 method overwritten by 'spatstat.geom':
#>   method     from
#>   print.boxx cli
#> Attaching SeuratObject
library(hdf5r)

f1 <- "data/Brain_3p_LT_filtered_feature_bc_matrix.h5"
data.file <- Read10X_h5(filename = f1, use.names = TRUE)
#>Warning message:
#>In sparseMatrix(i = indices[] + 1, p = indptr[], x = as.numeric(x = counts[]),  :
#>  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
data <- CreateSeuratObject(counts = data.file)
data.sce <- as.SingleCellExperiment(data)
data.seu <- as.Seurat(data.sce)
#>Error in .subset2(x, i, exact = exact) : subscript out of bounds

Created on 2021-04-12 by the reprex package (v2.0.0)

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 4.0.5 (2021-03-31)
#>  os       macOS Big Sur 10.16         
#>  system   x86_64, darwin17.0          
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_GB.UTF-8                 
#>  ctype    en_GB.UTF-8                 
#>  tz       Europe/London               
#>  date     2021-04-12                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package         * version    date       lib
#>  abind             1.4-5      2016-07-21 [1]
#>  assertthat        0.2.1      2019-03-21 [1]
#>  bit               4.0.4      2020-08-04 [1]
#>  bit64             4.0.5      2020-08-30 [1]
#>  cli               2.4.0      2021-04-05 [1]
#>  cluster           2.1.1      2021-02-14 [1]
#>  codetools         0.2-18     2020-11-04 [1]
#>  colorspace        2.0-0      2020-11-11 [1]
#>  cowplot           1.1.1      2020-12-30 [1]
#>  crayon            1.4.1      2021-02-08 [1]
#>  data.table        1.14.0     2021-02-21 [1]
#>  DBI               1.1.1      2021-01-15 [1]
#>  deldir            0.2-10     2021-02-16 [1]
#>  digest            0.6.27     2020-10-24 [1]
#>  dplyr             1.0.5      2021-03-05 [1]
#>  ellipsis          0.3.1      2020-05-15 [1]
#>  evaluate          0.14       2019-05-28 [1]
#>  fansi             0.4.2      2021-01-15 [1]
#>  fastmap           1.1.0      2021-01-25 [1]
#>  fitdistrplus      1.1-3      2020-12-05 [1]
#>  fs                1.5.0      2020-07-31 [1]
#>  future            1.21.0     2020-12-10 [1]
#>  future.apply      1.7.0      2021-01-04 [1]
#>  generics          0.1.0      2020-10-31 [1]
#>  ggplot2           3.3.3      2020-12-30 [1]
#>  ggrepel           0.9.1      2021-01-15 [1]
#>  ggridges          0.5.3      2021-01-08 [1]
#>  globals           0.14.0     2020-11-22 [1]
#>  glue              1.4.2      2020-08-27 [1]
#>  goftest           1.2-2      2019-12-02 [1]
#>  gridExtra         2.3        2017-09-09 [1]
#>  gtable            0.3.0      2019-03-25 [1]
#>  hdf5r           * 1.3.2      2020-03-25 [1]
#>  highr             0.8        2019-03-20 [1]
#>  htmltools         0.5.1.1    2021-01-22 [1]
#>  htmlwidgets       1.5.3      2020-12-10 [1]
#>  httpuv            1.5.5      2021-01-13 [1]
#>  httr              1.4.2      2020-07-20 [1]
#>  ica               1.0-2      2018-05-24 [1]
#>  igraph            1.2.6      2020-10-06 [1]
#>  irlba             2.3.3      2019-02-05 [1]
#>  jsonlite          1.7.2      2020-12-09 [1]
#>  KernSmooth        2.23-18    2020-10-29 [1]
#>  knitr             1.31       2021-01-27 [1]
#>  later             1.1.0.1    2020-06-05 [1]
#>  lattice           0.20-41    2020-04-02 [1]
#>  lazyeval          0.2.2      2019-03-15 [1]
#>  leiden            0.3.7      2021-01-26 [1]
#>  lifecycle         1.0.0      2021-02-15 [1]
#>  listenv           0.8.0      2019-12-05 [1]
#>  lmtest            0.9-38     2020-09-09 [1]
#>  magrittr          2.0.1      2020-11-17 [1]
#>  MASS              7.3-53.1   2021-02-12 [1]
#>  Matrix            1.3-2      2021-01-06 [1]
#>  matrixStats       0.58.0     2021-01-29 [1]
#>  mgcv              1.8-34     2021-02-16 [1]
#>  mime              0.10       2021-02-13 [1]
#>  miniUI            0.1.1.1    2018-05-18 [1]
#>  munsell           0.5.0      2018-06-12 [1]
#>  nlme              3.1-152    2021-02-04 [1]
#>  parallelly        1.24.0     2021-03-14 [1]
#>  patchwork         1.1.1      2020-12-17 [1]
#>  pbapply           1.4-3      2020-08-18 [1]
#>  pillar            1.5.1      2021-03-05 [1]
#>  pkgconfig         2.0.3      2019-09-22 [1]
#>  plotly            4.9.3      2021-01-10 [1]
#>  plyr              1.8.6      2020-03-03 [1]
#>  png               0.1-7      2013-12-03 [1]
#>  polyclip          1.10-0     2019-03-14 [1]
#>  promises          1.2.0.1    2021-02-11 [1]
#>  purrr             0.3.4      2020-04-17 [1]
#>  R6                2.5.0      2020-10-28 [1]
#>  RANN              2.6.1      2019-01-08 [1]
#>  RColorBrewer      1.1-2      2014-12-07 [1]
#>  Rcpp              1.0.6      2021-01-15 [1]
#>  RcppAnnoy         0.0.18     2020-12-15 [1]
#>  reprex            2.0.0      2021-04-02 [1]
#>  reshape2          1.4.4      2020-04-09 [1]
#>  reticulate        1.18       2020-10-25 [1]
#>  rlang             0.4.10     2020-12-30 [1]
#>  rmarkdown         2.7        2021-02-19 [1]
#>  ROCR              1.0-11     2020-05-02 [1]
#>  rpart             4.1-15     2019-04-12 [1]
#>  rstudioapi        0.13       2020-11-12 [1]
#>  Rtsne             0.15       2018-11-10 [1]
#>  scales            1.1.1      2020-05-11 [1]
#>  scattermore       0.7        2020-11-24 [1]
#>  sctransform       0.3.2.9006 2021-04-01 [1]
#>  sessioninfo       1.1.1      2018-11-05 [1]
#>  Seurat          * 4.0.1.9005 2021-04-07 [1]
#>  SeuratObject    * 4.0.0      2021-01-15 [1]
#>  shiny             1.6.0      2021-01-25 [1]
#>  spatstat.core     2.0-0      2021-03-23 [1]
#>  spatstat.data     2.1-0      2021-03-21 [1]
#>  spatstat.geom     2.0-1      2021-03-22 [1]
#>  spatstat.sparse   2.0-0      2021-03-16 [1]
#>  spatstat.utils    2.1-0      2021-03-15 [1]
#>  stringi           1.5.3      2020-09-09 [1]
#>  stringr           1.4.0      2019-02-10 [1]
#>  survival          3.2-10     2021-03-16 [1]
#>  tensor            1.5        2012-05-05 [1]
#>  tibble            3.1.0      2021-02-25 [1]
#>  tidyr             1.1.3      2021-03-03 [1]
#>  tidyselect        1.1.0      2020-05-11 [1]
#>  utf8              1.2.1      2021-03-12 [1]
#>  uwot              0.1.10     2020-12-15 [1]
#>  vctrs             0.3.7      2021-03-29 [1]
#>  viridisLite       0.3.0      2018-02-01 [1]
#>  withr             2.4.1      2021-01-26 [1]
#>  xfun              0.22       2021-03-11 [1]
#>  xtable            1.8-4      2019-04-21 [1]
#>  yaml              2.2.1      2020-02-01 [1]
#>  zoo               1.8-9      2021-03-09 [1]
#>  source                                 
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.1)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.1)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  Github (ChristophH/sctransform@73e2e3e)
#>  CRAN (R 4.0.2)                         
#>  Github (satijalab/seurat@8a863fb)      
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.5)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.1)                         
#>  CRAN (R 4.0.3)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#>  CRAN (R 4.0.2)                         
#> 
#> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library
@JTpath JTpath added the bug Something isn't working label Apr 12, 2021
@JTpath
Copy link
Author

JTpath commented Apr 14, 2021

Switched to the master version rather than the latest dev release and it works again.

@saketkc saketkc closed this as completed Apr 16, 2021
@ka-lw
Copy link

ka-lw commented Jun 2, 2021

Hi I'm getting the same issue - Seurat version Seurat_4.0.2
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

I've tried using Seurat_4.0.1 with no luck.

@saketkc
Copy link
Collaborator

saketkc commented Jun 2, 2021

This has been recently fixed in the develop branch. You can try updating Seurat to the latest dev version using the instructions here

@ka-lw
Copy link

ka-lw commented Jun 2, 2021

Nice, that's sorted it. Thanks for all your hard work guys.

@JTpath
Copy link
Author

JTpath commented Jun 2, 2021

This has been recently fixed in the develop branch. You can try updating Seurat to the latest dev version using the instructions here

Awesome! Thanks

I suspect I've duplicated this issue in #4549, I'll close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants