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

Error: matrix multiplication: incompatible matrix dimensions: 100x96490 and 96489x22 #237

Open
claireanjou opened this issue Jan 17, 2024 · 3 comments

Comments

@claireanjou
Copy link

When I am running RunHarmony, it produces this error message. What could this mean? I have ran the same code before and never encountered this error. Would appreciate any help, thanks!

ERROR MESSAGE:
Error: matrix multiplication: incompatible matrix dimensions: 100x96490 and 96489x22
In addition: Warning messages:
1: In theta * (1 - exp(-(N_b/(nclust * tau))^2)) :
longer object length is not a multiple of shorter object length
2: In rbind(rep(1, N), phi) :
number of columns of result is not a multiple of vector length (arg 1)

CODE SAMPLE:
pbmc_small <- FilterGenes(object = pbmc_small, min.value = 0.5, min.cells = 100)
pbmc_small <- NormalizeData(pbmc_small)
pbmc_small <- FindVariableFeatures(pbmc_small, selection.method = "vst", nfeatures = 2000)
pbmc_small <- ScaleData(pbmc_small, features = rownames(pbmc_small))

pbmc_small <- RunPCA(pbmc_small, features = VariableFeatures(object = pbmc_small))

[email protected]$library_id <- as.factor([email protected]$library_id)

pbmc_small <- RunHarmony(pbmc_small, group.by.vars="library_id", verbose = TRUE)

@pati-ni
Copy link
Collaborator

pati-ni commented Feb 16, 2024

Hi @claireanjou,

sorry for the delayed response. Can you share your sessionInfo() to determine your Seurat and harmony versions?

@fistorres
Copy link

Have the same problem.
SessionInfo:

R version 4.3.3 (2024-02-29)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Manjaro Linux

Matrix products: default
BLAS/LAPACK: /home/s/anaconda3/envs/deg/lib/libopenblasp-r0.3.27.so; LAPACK version 3.12.0

locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

time zone: Europe/Lisbon
tzcode source: system (glibc)

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

other attached packages:
[1] reticulate_1.38.0 scuttle_1.12.0
[3] scRNAseq_2.16.0 SingleCellExperiment_1.24.0
[5] ggplot2_3.5.1 celldex_1.12.0
[7] SingleR_2.4.0 SummarizedExperiment_1.32.0
[9] Biobase_2.62.0 GenomicRanges_1.54.1
[11] GenomeInfoDb_1.38.1 IRanges_2.36.0
[13] S4Vectors_0.40.2 BiocGenerics_0.48.1
[15] MatrixGenerics_1.14.0 matrixStats_1.3.0
[17] IRdisplay_1.1 patchwork_1.2.0
[19] dplyr_1.1.4 Seurat_5.1.0
[21] SeuratObject_5.0.2 sp_2.1-4
[23] spatstat.utils_3.0-5

loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.22 splines_4.3.3
[3] later_1.3.2 BiocIO_1.12.0
[5] pbdZMQ_0.3-11 filelock_1.0.3
[7] bitops_1.0-7 tibble_3.2.1
[9] polyclip_1.10-6 XML_3.99-0.16.1
[11] fastDummies_1.7.4 lifecycle_1.0.4
[13] ensembldb_2.26.0 globals_0.16.3
[15] lattice_0.22-6 MASS_7.3-60
[17] magrittr_2.0.3 plotly_4.10.4
[19] yaml_2.3.10 httpuv_1.6.15
[21] sctransform_0.4.1 spam_2.9-1
[23] spatstat.sparse_3.1-0 cowplot_1.1.3
[25] pbapply_1.7-2 DBI_1.2.2
[27] RColorBrewer_1.1-3 abind_1.4-5
[29] zlibbioc_1.48.0 Rtsne_0.17
[31] purrr_1.0.2 AnnotationFilter_1.26.0
[33] RCurl_1.98-1.14 rappdirs_0.3.3
[35] GenomeInfoDbData_1.2.11 ggrepel_0.9.5
[37] irlba_2.3.5.1 listenv_0.9.1
[39] goftest_1.2-3 RSpectra_0.16-1
[41] spatstat.random_3.2-3 fitdistrplus_1.2-1
[43] parallelly_1.37.1 DelayedMatrixStats_1.24.0
[45] leiden_0.4.3.1 codetools_0.2-20
[47] DelayedArray_0.28.0 xml2_1.3.6
[49] tidyselect_1.2.1 farver_2.1.2
[51] ScaledMatrix_1.10.0 BiocFileCache_2.10.1
[53] base64enc_0.1-3 spatstat.explore_3.2-6
[55] GenomicAlignments_1.38.0 jsonlite_1.8.8
[57] progressr_0.14.0 ggridges_0.5.6
[59] survival_3.6-4 progress_1.2.3
[61] tools_4.3.3 ica_1.0-3
[63] Rcpp_1.0.13 glue_1.7.0
[65] gridExtra_2.3 SparseArray_1.2.2
[67] withr_3.0.1 BiocManager_1.30.23
[69] fastmap_1.1.1 fansi_1.0.6
[71] digest_0.6.35 rsvd_1.0.5
[73] R6_2.5.1 mime_0.12
[75] colorspace_2.1-0 scattermore_1.2
[77] tensor_1.5 biomaRt_2.58.0
[79] spatstat.data_3.1-2 RSQLite_2.3.4
[81] utf8_1.2.4 tidyr_1.3.1
[83] generics_0.1.3 data.table_1.16.0
[85] rtracklayer_1.62.0 prettyunits_1.2.0
[87] httr_1.4.7 htmlwidgets_1.6.4
[89] S4Arrays_1.2.0 uwot_0.1.16
[91] pkgconfig_2.0.3 gtable_0.3.5
[93] blob_1.2.4 lmtest_0.9-40
[95] XVector_0.42.0 htmltools_0.5.8.1
[97] dotCall64_1.1-0 ProtGenerics_1.34.0
[99] scales_1.3.0 png_0.1-8
[101] harmony_1.0 rjson_0.2.21
[103] reshape2_1.4.4 uuid_1.2-0
[105] curl_5.1.0 nlme_3.1-164
[107] repr_1.1.7 zoo_1.8-12
[109] cachem_1.0.8 stringr_1.5.1
[111] BiocVersion_3.18.1 KernSmooth_2.23-22
[113] parallel_4.3.3 miniUI_0.1.1.1
[115] AnnotationDbi_1.64.1 restfulr_0.0.15
[117] pillar_1.9.0 grid_4.3.3
[119] vctrs_0.6.5 RANN_2.6.2
[121] promises_1.3.0 BiocSingular_1.18.0
[123] dbplyr_2.5.0 beachmat_2.18.0
[125] xtable_1.8-4 cluster_2.1.6
[127] evaluate_0.24.0 GenomicFeatures_1.54.1
[129] Rsamtools_2.18.0 cli_3.6.3
[131] compiler_4.3.3 rlang_1.1.4
[133] crayon_1.5.2 future.apply_1.11.2
[135] labeling_0.4.3 plyr_1.8.9
[137] stringi_1.8.4 viridisLite_0.4.2
[139] deldir_2.0-4 BiocParallel_1.36.0
[141] munsell_0.5.1 Biostrings_2.70.1
[143] lazyeval_0.2.2 spatstat.geom_3.2-9
[145] Matrix_1.6-5 ExperimentHub_2.10.0
[147] IRkernel_1.3.2 RcppHNSW_0.6.0
[149] hms_1.1.3 sparseMatrixStats_1.14.0
[151] bit64_4.0.5 future_1.33.2
[153] KEGGREST_1.42.0 shiny_1.8.1.1
[155] interactiveDisplayBase_1.40.0 AnnotationHub_3.10.0
[157] ROCR_1.0-11 igraph_2.0.3
[159] memoise_2.0.1 bit_4.0.5

@pati-ni
Copy link
Collaborator

pati-ni commented Nov 8, 2024

Hi @fistorres,

Can you share the code you are running? Is this on the pbmc_small dataset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants