This question has also been asked on Biostars

I am trying to create a Seurat object using the package "Seurat". When I am reading my raw files using the function Read10X, I am getting this error

Error in dimnamesGets(x, value) : length of Dimnames[[1]] (45948) is not equal to Dim[1] (45947).

I am unsure how to resolve this issue.

R sessionInfo:

R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

other attached packages:
[1] sp_1.5-0           SeuratObject_4.1.1 Seurat_4.1.1       Matrix_1.5-1

loaded via a namespace (and not attached):
  [1] nlme_3.1-153          spatstat.sparse_2.1-1 matrixStats_0.62.0    RcppAnnoy_0.0.19
  [5] RColorBrewer_1.1-3    httr_1.4.4            sctransform_0.3.4     tools_4.1.2
  [9] utf8_1.2.2            R6_2.5.1              irlba_2.3.5           rpart_4.1-15
 [13] KernSmooth_2.23-20    uwot_0.1.14           mgcv_1.8-38           rgeos_0.5-9
 [17] DBI_1.1.3             lazyeval_0.2.2        colorspace_2.0-3      tidyselect_1.1.2
 [21] gridExtra_2.3         compiler_4.1.2        progressr_0.11.0      cli_3.4.0
 [25] plotly_4.10.0         scales_1.2.1          lmtest_0.9-40         spatstat.data_2.2-0
 [29] ggridges_0.5.3        pbapply_1.5-0         goftest_1.2-3         stringr_1.4.1
 [33] digest_0.6.29         spatstat.utils_2.3-1  pkgconfig_2.0.3       htmltools_0.5.3
 [37] parallelly_1.32.1     fastmap_1.1.0         htmlwidgets_1.5.4     rlang_1.0.5
 [41] rstudioapi_0.14       shiny_1.7.2           generics_0.1.3        zoo_1.8-10
 [45] jsonlite_1.8.0        spatstat.random_2.2-0 ica_1.0-3             dplyr_1.0.10
 [49] magrittr_2.0.3        patchwork_1.1.2       Rcpp_1.0.9            munsell_0.5.0
 [53] fansi_1.0.3           abind_1.4-5           reticulate_1.26       lifecycle_1.0.2
 [57] stringi_1.7.6         MASS_7.3-54           Rtsne_0.16            plyr_1.8.7
 [61] grid_4.1.2            parallel_4.1.2        listenv_0.8.0         promises_1.2.0.1
 [65] ggrepel_0.9.1         deldir_1.0-6          miniUI_0.1.1.1        lattice_0.20-45
 [69] cowplot_1.1.1         splines_4.1.2         tensor_1.5            pillar_1.8.1
 [73] igraph_1.3.4          spatstat.geom_2.4-0   future.apply_1.9.1    reshape2_1.4.4
 [77] codetools_0.2-18      leiden_0.4.3          glue_1.6.2            data.table_1.14.2
 [81] png_0.1-7             vctrs_0.4.1           httpuv_1.6.6          polyclip_1.10-0
 [85] gtable_0.3.1          RANN_2.6.1            purrr_0.3.4           spatstat.core_2.4-4
 [89] tidyr_1.2.1           scattermore_0.8       future_1.28.0         assertthat_0.2.1
 [93] ggplot2_3.3.6         mime_0.12             xtable_1.8-4          later_1.3.0
 [97] survival_3.2-13       viridisLite_0.4.1     tibble_3.1.8          cluster_2.1.2
[101] globals_0.16.1        fitdistrplus_1.1-8    ellipsis_0.3.2        ROCR_1.0-11

2 Answers 2


Check the length of your files. The error clearly says that there is a difference in the length of your files. Your file length should be equal.

I think the problem may be the presence of a header in one of your files. Removing the header may solve the problem.


There is a mismatch of 1 line between the several files, suggesting that probably either the barcodes of features file has a header line which is not standard. Remove any header lines from these files.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.