-
Notifications
You must be signed in to change notification settings - Fork 918
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
How to resolve error "all assays must have the same nrow and ncol"? #4633
Comments
I am also having the same issue number 2 as above. I think I have the latest R/Seurat/SingleCellExperiment versions. I would be very interested if anyone has had any luck resolving this! Thanks in advance! sessionInfo() Matrix products: default locale: attached base packages: other attached packages: |
Update: If helpful, I was able to convert my seurat object to a SCE after running DietSeurat and keeping only the umap graph in addition to the counts and data slots.
I am also having the same issue when trying to convert my seurat object to a SCE. I am still able to create a SCE from the pbmc test data. Thanks!
Matrix products: default locale: attached base packages: other attached packages: |
We are having the same issue as of very recently. This code used to work
But now we are getting an error
I think recent changes in Seurat have introduced a bug here. Our session info
We were able to get around this issue by following the advice of @blc49 and using DietSeurat
|
Dear @alexjacobsCDS Many thanks, that seems to have done the trick! Thanks again, Nathan |
Hi can someone share an object (or a subsampled / dummy version that reproduces the issue) with us at [email protected] so we can fix this issue? |
Dear @torkencz - I have sent through a link for you! Many thanks, Nathan |
Can confirm as well: |
I tried to convert my seurat object to a singlecellexperiment (SCE) object after running SCTransform (making two assays, SCT and RNA, which I guess is what is causing the issue) and got this same issue. (Sorry for the longer example)
Then trying to convert it to an SCE object with and without specifying the assay:
|
@NathanKenny thank you for your object. I found what was happening. In the in line 1187 in as.SingleCellExperiment |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
Hi all, This bug should be resolved now on the |
Many thanks!
Nathan
…On Mon, Jul 12, 2021 at 1:29 AM Andrew Butler ***@***.***> wrote:
Hi all,
This bug should be resolved now on the develop branch. Please try
installing (instructions here
<https://satijalab.org/seurat/articles/install.html#install-the-development-version-of-seurat-1>)
to fix the issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4633 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3LGFUHA5K3AKWDPOWREYTTXIZNFANCNFSM46X55KTA>
.
|
I just installed the develop branch and still get the "Error in method(object) : all assays must have the same nrow and ncol" |
Can you post your |
R version 4.0.1 (2020-06-06) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.3 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats4 parallel stats graphics grDevices utils datasets methods base other attached packages: [1] monocle3_1.0.0 SeuratWrappers_0.3.0 metacell_0.3.6 [4] limma_3.46.0 corrplot_0.90 SCopeLoomR_0.11.0 [7] autospill_0.2.0 devtools_2.4.2 usethis_2.0.1 [10] uwot_0.1.10 Matrix_1.3-4 ComplexHeatmap_2.6.2 [13] ConsensusClusterPlus_1.54.0 FlowSOM_1.22.0 CATALYST_1.14.1 [16] HDCytoData_1.10.0 flowCore_2.2.0 ExperimentHub_1.16.1 [19] readxl_1.3.1 installr_0.23.2 ggstatsplot_0.8.0 [22] here_1.0.1 BgeeCall_1.6.2 gmodels_2.18.1 [25] igraph_1.2.6 gatepoints_0.1.4 circlize_0.4.13 [28] ensembldb_2.14.1 AnnotationFilter_1.14.0 GenomicFeatures_1.42.3 [31] AnnotationDbi_1.52.0 AnnotationHub_2.22.1 BiocFileCache_1.14.0 [34] dbplyr_2.1.1 ggrepel_0.9.1 scales_1.1.1 [37] plyr_1.8.6 loomR_0.2.1.9000 itertools_0.1-3 [40] iterators_1.0.13 hdf5r_1.3.3 R6_2.5.0 [43] biomaRt_2.46.3 forcats_0.5.1 stringr_1.4.0 [46] dplyr_1.0.7 purrr_0.3.4 readr_1.4.0 [49] tidyr_1.1.3 tibble_3.1.2 tidyverse_1.3.1 [52] cowplot_1.1.1 scater_1.18.6 SingleCellExperiment_1.12.0 [55] SummarizedExperiment_1.20.0 GenomicRanges_1.42.0 GenomeInfoDb_1.26.7 [58] IRanges_2.24.1 S4Vectors_0.28.1 MatrixGenerics_1.2.1 [61] matrixStats_0.59.0 metap_1.4 multtest_2.46.0 [64] Biobase_2.50.0 BiocGenerics_0.36.1 MetaDE_2.2.3 [67] patchwork_1.1.1 ggplot2_3.3.5 SeuratDisk_0.0.0.9019 [70] SeuratObject_4.0.2 Seurat_4.0.3.9009 loaded via a namespace (and not attached): [1] PMCMRplus_1.9.0 tinytex_0.32 pbapply_1.4-3 [4] lattice_0.20-41 haven_2.4.1 vctrs_0.3.8 [7] mgcv_1.8-31 gmp_0.6-2 blob_1.2.1 [10] survival_3.2-3 RBGL_1.66.0 tgconfig_0.1.2 [13] spatstat.data_2.1-0 later_1.2.0 R.utils_2.10.1 [16] DBI_1.1.1 rappdirs_0.3.3 jpeg_0.1-8.1 [19] zlibbioc_1.36.0 MatrixModels_0.5-0 htmlwidgets_1.5.3 [22] mvtnorm_1.1-2 GlobalOptions_0.1.2 future_1.21.0 [25] leiden_0.3.8 pairwiseComparisons_3.1.6 irlba_2.3.3 [28] Rcpp_1.0.7 KernSmooth_2.23-17 promises_1.2.0.1 [31] kSamples_1.2-9 gdata_2.18.0 DelayedArray_0.16.3 [34] dbscan_1.1-8 pkgload_1.2.1 statsExpressions_1.1.0 [37] graph_1.68.0 RcppParallel_5.1.4 RSpectra_0.16-0 [40] fs_1.5.0 mnormt_2.0.2 digest_0.6.27 [43] png_0.1-7 sctransform_0.3.2.9007 pkgconfig_2.0.3 [46] DelayedMatrixStats_1.12.3 ggbeeswarm_0.6.0 nnls_1.4 [49] reticulate_1.20 spam_2.7-0 beeswarm_0.4.0 [52] GetoptLong_1.0.5 xfun_0.24 zoo_1.8-9 [55] tidyselect_1.1.1 performance_0.7.2 reshape2_1.4.4 [58] ica_1.0-2 viridisLite_0.4.0 rtracklayer_1.50.0 [61] pkgbuild_1.2.0 rlang_0.4.11 hexbin_1.28.2 [64] Rmpfr_0.8-4 glue_1.4.2 RColorBrewer_1.1-2 [67] modelr_0.1.8 umap_0.2.7.0 multcompView_0.1-8 [70] fields_12.5 RProtoBufLib_2.2.0 ggsignif_0.6.2 [73] bayestestR_0.10.0 DESeq2_1.30.1 labeling_0.4.2 [76] mutoss_0.1-12 httpuv_1.6.1 BiocNeighbors_1.8.2 [79] TH.data_1.0-10 annotate_1.68.0 jsonlite_1.7.2 [82] XVector_0.30.0 tmvnsim_1.0-2 bit_4.0.4 [85] shinyFiles_0.9.0 mime_0.11 gridExtra_2.3 [88] Rsamtools_2.6.0 stringi_1.6.2 processx_3.5.2 [91] insight_0.14.2 BWStest_0.2.2 spatstat.sparse_2.0-0 [94] scattermore_0.7 rbibutils_2.2.1 bitops_1.0-7 [97] cli_3.0.0 Rdpack_2.1.2 rhdf5filters_1.2.1 [100] maps_3.3.0 RSQLite_2.2.7 data.table_1.14.0 [103] correlation_0.6.1 rstudioapi_0.13 ggcyto_1.18.0 [106] GenomicAlignments_1.26.0 nlme_3.1-148 locfit_1.5-9.4 [109] listenv_0.8.0 samr_3.0 miniUI_0.1.1.1 [112] leidenbase_0.1.3 R.oo_1.24.0 sessioninfo_1.1.1 [115] lifecycle_1.0.0 munsell_0.5.0 cellranger_1.1.0 [118] R.methodsS3_1.8.1 moments_0.14 codetools_0.2-16 [121] coda_0.19-4 vipor_0.4.5 lmtest_0.9-38 [124] flowWorkspace_4.2.0 xtable_1.8-4 ROCR_1.0-11 [127] BiocManager_1.30.16 abind_1.4-5 farver_2.1.0 [130] parallelly_1.26.1 RANN_2.6.1 askpass_1.1 [133] SuppDists_1.1-9.5 RcppAnnoy_0.0.18 goftest_1.2-2 [136] cluster_2.1.0 drc_3.0-1 future.apply_1.7.0 [139] zeallot_0.1.0 ellipsis_0.3.2 prettyunits_1.1.1 [142] lubridate_1.7.10 ggridges_0.5.3 reprex_2.0.0 [145] tgstat_2.3.16 remotes_2.4.0 TFisher_0.2.0 [148] paletteer_1.3.0 parameters_0.14.0 testthat_3.0.4 [151] spatstat.utils_2.2-0 mc2d_0.1-21 htmltools_0.5.1.1 [154] yaml_2.2.1 ipmisc_6.0.2 utf8_1.2.1 [157] plotly_4.9.4.1 interactiveDisplayBase_1.28.0 XML_3.99-0.6 [160] aws.s3_0.3.21 foreign_0.8-80 withr_2.4.2 [163] scuttle_1.0.4 fitdistrplus_1.1-5 BiocParallel_1.24.1 [166] BayesFactor_0.9.12-4.2 bit64_4.0.5 effectsize_0.4.5 [169] multcomp_1.4-17 ProtGenerics_1.22.0 GSA_1.03.1 [172] Biostrings_2.58.0 spatstat.core_2.2-0 combinat_0.0-8 [175] cytolib_2.2.1 rsvd_1.0.5 memoise_2.0.0 [178] rio_0.5.27 callr_3.7.0 geneplotter_1.68.0 [181] ps_1.6.0 curl_4.3.2 fansi_0.5.0 [184] tensor_1.5 edgeR_3.32.1 cachem_1.0.5 [187] desc_1.3.0 deldir_0.2-10 impute_1.64.0 [190] rjson_0.2.20 openxlsx_4.2.4 tgutil_0.1.6 [193] clue_0.3-59 rprojroot_2.0.2 tools_4.0.1 [196] sandwich_3.0-1 magrittr_2.0.1 proxy_0.4-26 [199] RCurl_1.98-1.3 car_3.0-11 aws.signature_0.6.0 [202] xml2_1.3.2 httr_1.4.2 assertthat_0.2.1 [205] globals_0.14.0 Rhdf5lib_1.12.1 rslurm_0.6.0 [208] progress_1.2.2 tximport_1.18.0 genefilter_1.72.1 [211] gtools_3.9.2 shape_1.4.6 beachmat_2.6.4 [214] BiocVersion_3.12.0 rematch2_2.1.2 BiocSingular_1.6.0 [217] rhdf5_2.34.0 splines_4.0.1 carData_3.0-4 [220] colorspace_2.0-2 generics_0.1.0 base64enc_0.1-3 [223] ncdfFlow_2.36.0 CytoML_2.2.2 pillar_1.6.1 [226] sn_2.0.0 Rgraphviz_2.34.0 sp_1.4-5 [229] WRS2_1.1-2 GenomeInfoDbData_1.2.4 dotCall64_1.0-1 [232] pdist_1.2 gtable_0.3.0 rvest_1.0.0 [235] zip_2.2.0 lpSolveAPI_5.5.2.0-17.7 knitr_1.33 [238] latticeExtra_0.6-29 fastmap_1.1.0 Cairo_1.5-13 [241] broom_0.7.8 openssl_1.4.4 backports_1.2.1 [244] plotrix_3.8-1 tripack_1.3-9.1 hms_1.1.0 [247] Rtsne_0.15 shiny_1.6.0 polyclip_1.10-0 [250] numDeriv_2016.8-1.1 mathjaxr_1.4-0 lazyeval_0.2.2 [253] tsne_0.1-3 crayon_1.4.1 MASS_7.3-51.6 [256] sparseMatrixStats_1.2.1 viridis_0.6.1 reshape_0.8.8 [259] rpart_4.1-15 compiler_4.0.1 spatstat.geom_2.2-2
|
Hmm, are you able to share the object (or downsampled version of the object) to reproduce the issue (email is [email protected] if you don't want to post here)? |
Hi Andrew, Just thought to chime in as I had the same issue. Updating to the latest dev version did fix the issue however it appears there are sitll some other bugs. For example, it doesn't transfer the dimensional reduced data (PCA, UMAP, etc).
Thank you for all the work going to support interoperability! |
Hi @gAleryani , Could you provide an example object? It seems library(Seurat)
#> Attaching SeuratObject
library(SeuratData)
#> Registered S3 method overwritten by 'cli':
#> method from
#> print.boxx spatstat.geom
#> ── Installed datasets ───────────────────────────────────── SeuratData v0.2.1 ──
#> ✓ pbmc3k 3.1.4 ✓ stxBrain 0.1.1
#> ────────────────────────────────────── Key ─────────────────────────────────────
#> ✓ Dataset loaded successfully
#> > Dataset built with a newer version of Seurat than installed
#> ❓ Unknown version of Seurat installed
pbmc3k.final
#> An object of class Seurat
#> 13714 features across 2638 samples within 1 assay
#> Active assay: RNA (13714 features, 2000 variable features)
#> 2 dimensional reductions calculated: pca, umap
as.SingleCellExperiment(pbmc3k.final)
#> class: SingleCellExperiment
#> dim: 13714 2638
#> metadata(0):
#> assays(3): counts logcounts scaledata
#> rownames(13714): AL627309.1 AP006222.2 ... PNRC2.1 SRSF10.1
#> rowData names(0):
#> colnames(2638): AAACATACAACCAC AAACATTGAGCTAC ... TTTGCATGAGAGGC
#> TTTGCATGCCTCAC
#> colData names(8): orig.ident nCount_RNA ... seurat_clusters ident
#> reducedDimNames(2): PCA UMAP
#> mainExpName: RNA
#> altExpNames(0): Created on 2021-07-14 by the reprex package (v2.0.0) |
Hi @andrewwbutler,
########################################
Thanks again for the help, and I understand if this is a low priority investigation :) |
I believe this is because SingleCellExperiment associates the |
Exactly, my seurat object was clustered and the dataset was merged, not integrated |
You were right on point with this one @andrewwbutler, thanks for solving this one for me, I should have dug deeper on how SingleCellExperiment objects are structured, my bad! Thanks again! :) @Lopo358 Does using one of the datasets provided by SeuratDisk, such as the 'pbmc3k' example provided above, work for you? |
Hi there,
I hope to convert my Seurat object to SingleCellExperiment object, but I encountered an error.
Similar to unresolved issue Which Assay to use before converting Seurat object to other object classes? #4534, should I change the DefaultAssay() of my Seurat object to RNA or SCT before doing the conversion?
How to solve the error of Error in method(object) : all assays must have the same nrow and ncol?
I checked ncol() and ncol() of my Seurat object when I set active assay to SCT and RNA, and they have the same values..., but the error is still there.
Thank you for your help!
The text was updated successfully, but these errors were encountered: