constantAmateur / SoupX

R package to quantify and remove cell free mRNAs from droplet based scRNA-seq data
248 stars 34 forks source link

`load10x` can't find `clusters.csv` in CellRanger 7.1.0 output #132

Open aseyedia opened 1 year ago

aseyedia commented 1 year ago

I'm trying to load in some output from CR count 7.1.0 and it can't automatically load the cluster information even though it's exactly where it's supposed to be in v7 CellRanger outputs. I'm definitely using SoupX 1.6.1.

https://github.com/constantAmateur/SoupX/blob/8d89492306a7e82a79a3c0588b806d5127f2003c/R/load10X.R#L64

> file.exists("code/03-count/HTS-SO21-07-NLP1-5p-GEX_count/outs/analysis/clustering/gene_expression_graphclust/clusters.csv")
[1] TRUE
> for (i in 1:length(sc)) {
+   sc[[i]] <- autoEstCont(sc[[i]], soupQuantile = 0.5)
+   sc[[i]] <-  adjustCounts(sc[[i]])
+ }
Error in autoEstCont(sc[[i]], soupQuantile = 0.5) : 
  Clustering information must be supplied, run setClusters first.

I am, however, able to get the cluster info using setClusters:

clusters <- lapply(Sys.glob(paste0("code/03-count/*/outs/analysis/clustering/gene_expression_graphclust/clusters.csv")), read.csv)

for (i in 1:length(sc)) {
  sc[[i]] <- setClusters(sc[[i]], clusters[[i]]$Cluster)
}

I'm using R 4.1.2. Here's my session_info in case you need it:

> sessioninfo::session_info()
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to create bus connection: Host is down
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.1.2 (2021-11-01)
 os       Red Hat Enterprise Linux 8.2 (Ootpa)
 system   x86_64, linux-gnu
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2023-02-07
 rstudio  99.9.9 Juliet Rose (server)
 pandoc   NA

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ! package         * version date (UTC) lib source
   abind             1.4-5   2016-07-21 [1] CRAN (R 4.1.2)
   assertthat        0.2.1   2019-03-21 [1] CRAN (R 4.1.2)
 R cli               3.2.0   <NA>       [2] <NA>
   cluster           2.1.2   2021-04-17 [2] CRAN (R 4.1.2)
   codetools         0.2-18  2020-11-04 [2] CRAN (R 4.1.2)
   colorspace        2.0-3   2022-02-21 [1] CRAN (R 4.1.2)
   cowplot           1.1.1   2020-12-30 [1] CRAN (R 4.1.2)
   data.table        1.14.6  2022-11-16 [1] CRAN (R 4.1.2)
   DBI               1.1.3   2022-06-18 [1] CRAN (R 4.1.2)
   deldir            1.0-6   2021-10-23 [1] CRAN (R 4.1.2)
   digest            0.6.30  2022-10-18 [1] CRAN (R 4.1.2)
   dplyr             1.0.8   2022-02-08 [1] CRAN (R 4.1.2)
   ellipsis          0.3.2   2021-04-29 [1] CRAN (R 4.1.2)
   fansi             1.0.3   2022-03-24 [1] CRAN (R 4.1.2)
   fastmap           1.1.0   2021-01-25 [1] CRAN (R 4.1.2)
   fitdistrplus      1.1-8   2022-03-10 [1] CRAN (R 4.1.2)
   future            1.29.0  2022-11-06 [1] CRAN (R 4.1.2)
   future.apply      1.10.0  2022-11-05 [1] CRAN (R 4.1.2)
   generics          0.1.3   2022-07-05 [1] CRAN (R 4.1.2)
   ggplot2           3.3.6   2022-05-03 [1] CRAN (R 4.1.2)
   ggrepel           0.9.2   2022-11-06 [1] CRAN (R 4.1.2)
   ggridges          0.5.4   2022-09-26 [1] CRAN (R 4.1.2)
   globals           0.16.2  2022-11-21 [1] CRAN (R 4.1.2)
   glue              1.6.2   2022-02-24 [1] CRAN (R 4.1.2)
   goftest           1.2-3   2021-10-07 [1] CRAN (R 4.1.2)
   gridExtra         2.3     2017-09-09 [1] CRAN (R 4.1.2)
   gtable            0.3.1   2022-09-01 [1] CRAN (R 4.1.2)
   here            * 1.0.1   2020-12-13 [1] CRAN (R 4.1.2)
   htmltools         0.5.4   2022-12-07 [1] CRAN (R 4.1.2)
   htmlwidgets       1.6.0   2022-12-15 [1] CRAN (R 4.1.2)
   httpuv            1.6.7   2022-12-14 [1] CRAN (R 4.1.2)
   httr              1.4.4   2022-08-17 [1] CRAN (R 4.1.2)
   ica               1.0-3   2022-07-08 [1] CRAN (R 4.1.2)
   igraph            1.3.2   2022-06-13 [1] CRAN (R 4.1.2)
   irlba             2.3.5.1 2022-10-03 [1] CRAN (R 4.1.2)
   jsonlite          1.8.4   2022-12-06 [1] CRAN (R 4.1.2)
   KernSmooth        2.23-20 2021-05-03 [2] CRAN (R 4.1.2)
   later             1.3.0   2021-08-18 [1] CRAN (R 4.1.2)
   lattice           0.20-45 2021-09-22 [2] CRAN (R 4.1.2)
   lazyeval          0.2.2   2019-03-15 [1] CRAN (R 4.1.2)
   leiden            0.4.3   2022-09-10 [1] CRAN (R 4.1.2)
   lifecycle         1.0.1   2021-09-24 [1] CRAN (R 4.1.2)
   listenv           0.9.0   2022-12-16 [1] CRAN (R 4.1.2)
   lmtest            0.9-40  2022-03-21 [1] CRAN (R 4.1.2)
   magrittr          2.0.3   2022-03-30 [1] CRAN (R 4.1.2)
   MASS              7.3-54  2021-05-03 [2] CRAN (R 4.1.2)
   Matrix          * 1.5-3   2022-11-11 [1] CRAN (R 4.1.2)
   matrixStats       0.62.0  2022-04-19 [1] CRAN (R 4.1.2)
   mgcv              1.8-38  2021-10-06 [2] CRAN (R 4.1.2)
   mime              0.12    2021-09-28 [1] CRAN (R 4.1.2)
   miniUI            0.1.1.1 2018-05-18 [1] CRAN (R 4.1.2)
   munsell           0.5.0   2018-06-12 [1] CRAN (R 4.1.2)
   nlme              3.1-153 2021-09-07 [2] CRAN (R 4.1.2)
   parallelly        1.33.0  2022-12-14 [1] CRAN (R 4.1.2)
   patchwork         1.1.2   2022-08-19 [1] CRAN (R 4.1.2)
   pbapply           1.6-0   2022-11-16 [1] CRAN (R 4.1.2)
   pillar            1.8.1   2022-08-19 [1] CRAN (R 4.1.2)
   pkgconfig         2.0.3   2019-09-22 [1] CRAN (R 4.1.2)
 R plotly            4.10.0  <NA>       [2] <NA>
   plyr              1.8.7   2022-03-24 [1] CRAN (R 4.1.2)
   png               0.1-8   2022-11-29 [1] CRAN (R 4.1.2)
   polyclip          1.10-4  2022-10-20 [1] CRAN (R 4.1.2)
   progressr         0.12.0  2022-12-13 [1] CRAN (R 4.1.2)
   promises          1.2.0.1 2021-02-11 [1] CRAN (R 4.1.2)
   purrr             0.3.5   2022-10-06 [1] CRAN (R 4.1.2)
   R6                2.5.1   2021-08-19 [1] CRAN (R 4.1.2)
   RANN              2.6.1   2019-01-08 [1] CRAN (R 4.1.2)
   RColorBrewer      1.1-3   2022-04-03 [1] CRAN (R 4.1.2)
   Rcpp              1.0.8.3 2022-03-17 [1] CRAN (R 4.1.2)
   RcppAnnoy         0.0.20  2022-10-27 [1] CRAN (R 4.1.2)
   reshape2          1.4.4   2020-04-09 [1] CRAN (R 4.1.2)
   reticulate        1.25    2022-05-11 [1] CRAN (R 4.1.2)
   rgeos             0.6-1   2022-12-14 [1] CRAN (R 4.1.2)
 R rlang             1.0.2   <NA>       [2] <NA>
   ROCR              1.0-11  2020-05-02 [1] CRAN (R 4.1.2)
   rpart             4.1-15  2019-04-12 [2] CRAN (R 4.1.2)
   rprojroot         2.0.3   2022-04-02 [1] CRAN (R 4.1.2)
   Rtsne             0.16    2022-04-17 [1] CRAN (R 4.1.2)
   scales            1.2.1   2022-08-20 [1] CRAN (R 4.1.2)
   scattermore       0.8     2022-02-14 [1] CRAN (R 4.1.2)
   sctransform       0.3.5   2022-09-21 [1] CRAN (R 4.1.2)
   sessioninfo       1.2.2   2021-12-06 [1] CRAN (R 4.1.2)
   Seurat          * 4.1.1   2022-05-02 [1] CRAN (R 4.1.2)
   SeuratObject    * 4.1.0   2022-05-01 [1] CRAN (R 4.1.2)
   shiny             1.7.4   2022-12-15 [1] CRAN (R 4.1.2)
   SoupX           * 1.6.1   2022-05-26 [1] CRAN (R 4.1.2)
   sp              * 1.5-1   2022-11-07 [1] CRAN (R 4.1.2)
   spatstat.core     2.4-0   2022-02-15 [1] CRAN (R 4.1.2)
   spatstat.data     2.2-0   2022-04-18 [1] CRAN (R 4.1.2)
   spatstat.geom     2.3-2   2022-02-12 [1] CRAN (R 4.1.2)
   spatstat.random   2.1-0   2022-02-12 [1] CRAN (R 4.1.2)
   spatstat.sparse   2.1-1   2022-04-18 [1] CRAN (R 4.1.2)
   spatstat.utils    2.3-1   2022-05-06 [1] CRAN (R 4.1.2)
   stringi           1.7.8   2022-07-11 [1] CRAN (R 4.1.2)
   stringr           1.4.1   2022-08-20 [1] CRAN (R 4.1.2)
   survival          3.2-13  2021-08-24 [2] CRAN (R 4.1.2)
   tensor            1.5     2012-05-05 [1] CRAN (R 4.1.2)
   tibble            3.1.7   2022-05-03 [1] CRAN (R 4.1.2)
   tidyr             1.2.0   2022-02-01 [1] CRAN (R 4.1.2)
   tidyselect        1.1.2   2022-02-21 [1] CRAN (R 4.1.2)
   utf8              1.2.2   2021-07-24 [1] CRAN (R 4.1.2)
   uwot              0.1.14  2022-08-22 [1] CRAN (R 4.1.2)
   vctrs             0.4.0   2022-03-30 [1] CRAN (R 4.1.2)
   viridisLite       0.4.1   2022-08-22 [1] CRAN (R 4.1.2)
   xtable            1.8-4   2019-04-21 [1] CRAN (R 4.1.2)
   zoo               1.8-10  2022-04-15 [1] CRAN (R 4.1.2)

 [1] /home/seyediana/R/x86_64-pc-linux-gnu-library/4.1
 [2] /cm/shared/apps_chop/R/4.1.2/lib64/R/library

 R ── Package was removed from disk.
EDePasquale commented 9 months ago

I have the same issue with Cell Ranger 7, and the work around provided by aseyedia works just fine (thank you!), but I would like to see this get fixed too. Thanks!