neurorestore / Libra

MIT License
144 stars 23 forks source link

Error in h(simpleError(msg, call)): Error in calculating parameter "x" when selecting method for function "rowSums": subscript out of bounds In addition: Warning message: Layer ‘data' is empty. #59

Closed yecotoo closed 2 weeks ago

yecotoo commented 3 weeks ago

when I run: libra_result = run_de(expr, meta = meta, replicate_col = "orig.ident", cell_type_col = "cell_type", label_col = "seurat_clusters",

input_type = "scRNA",

         de_family = 'pseudobulk', 
         de_method = 'edgeR', 
         de_type = 'LRT',
         #min_cells = 3,
         #min_reps = 2,
         n_threads = 4
         )

I met a mistake: Error in h(simpleError(msg, call)): Error in calculating parameter "x" when selecting method for function "rowSums": subscript out of bounds In addition: Warning message: Layer ‘data' is empty. How to fix it? I Have checked my expr and meta, nothing was wrong, what the problem could be? I wonder. Thanks

NicoHadas commented 3 weeks ago

I am having the same issue. One of the new commits may have created this bug as Libra was working fine on my data a couple of months ago.

yecotoo commented 3 weeks ago

我遇到了同样的问题。其中一个新提交可能造成了这个错误,因为几个月前 Libra 对我的数据运行良好。

I agree! I run it well last week, but met the error these days after update! I checked my data many times, found nothing wrong

AlanTeoYueYang commented 3 weeks ago

Hi all, can you provide the full error log for tracing here? Also, are you able to run the Libra on the toy data without error?

library(Libra)
library(Seurat)
data(hagai_toy)
res = Libra::run_de(hagai_toy)
yecotoo commented 3 weeks ago

Hi all, can you provide the full error log for tracing here? Also, are you able to run the Libra on the toy data without error?

library(Libra)
library(Seurat)
data(hagai_toy)
res = Libra::run_de(hagai_toy)

library(Seurat) data(hagai_toy) res = Libra::run_de(hagai_toy) Error in h(simpleError(msg, call)): Error in calculating parameter "x" when selecting method for function "rowSums": subscript out of bounds In addition: Warning message: Layer ‘data' is empty. Not work, Still meet the error! Some thing may wrong in the code you provided

AlanTeoYueYang commented 3 weeks ago

Hi, can you provide the sessionInfo()? In particular the Seurat version?

yecotoo commented 3 weeks ago

屏幕截图 2024-08-22 161904

yecotoo commented 3 weeks ago

Hi, can you provide the sessionInfo()? In particular the Seurat version?

sessionInfo() R version 4.4.1 (2024-06-14 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale: [1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8 LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C LC_TIME=Chinese (Simplified)_China.utf8

time zone: Asia/Shanghai tzcode source: internal

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

other attached packages: [1] Libra_1.0.0 Seurat_5.1.0 SeuratObject_5.0.2 sp_2.1-4

loaded via a namespace (and not attached): [1] RcppAnnoy_0.0.22 splines_4.4.1 later_1.3.2 tibble_3.2.1 polyclip_1.10-7 fastDummies_1.7.4 lifecycle_1.0.4 pbmcapply_1.5.1
[9] edgeR_4.2.1 globals_0.16.3 processx_3.8.4 lattice_0.22-6 MASS_7.3-61 magrittr_2.0.3 limma_3.60.4 plotly_4.10.4
[17] remotes_2.5.0 httpuv_1.6.15 sctransform_0.4.1 spam_2.10-0 sessioninfo_1.2.2 pkgbuild_1.4.4 spatstat.sparse_3.1-0 reticulate_1.38.0
[25] cowplot_1.1.3 pbapply_1.7-2 minqa_1.2.8 RColorBrewer_1.1-3 abind_1.4-5 pkgload_1.4.0 zlibbioc_1.50.0 glmmTMB_1.1.9
[33] Rtsne_0.17 GenomicRanges_1.56.1 purrr_1.0.2 BiocGenerics_0.50.0 msigdbr_7.5.1 GenomeInfoDbData_1.2.12 IRanges_2.38.1 S4Vectors_0.42.1
[41] ggrepel_0.9.5 irlba_2.3.5.1 listenv_0.9.1 spatstat.utils_3.1-0 pheatmap_1.0.12 goftest_1.2-3 RSpectra_0.16-2 spatstat.random_3.3-1
[49] fitdistrplus_1.2-1 parallelly_1.38.0 leiden_0.4.3.1 codetools_0.2-20 DelayedArray_0.30.1 tidyselect_1.2.1 UCSC.utils_1.0.0 tester_0.2.0
[57] lme4_1.1-35.5 matrixStats_1.3.0 stats4_4.4.1 spatstat.explore_3.3-1 jsonlite_1.8.8 ellipsis_0.3.2 progressr_0.14.0 ggridges_0.5.6
[65] survival_3.7-0 tools_4.4.1 ica_1.0-3 Rcpp_1.0.13 blme_1.0-5 glue_1.7.0 gridExtra_2.3 SparseArray_1.4.8
[73] mgcv_1.9-1 DESeq2_1.44.0 MatrixGenerics_1.17.0 usethis_3.0.0 GenomeInfoDb_1.40.1 dplyr_1.1.4 numDeriv_2016.8-1.1 BiocManager_1.30.24
[81] fastmap_1.2.0 boot_1.3-30 fansi_1.0.6 callr_3.7.6 digest_0.6.36 R6_2.5.1 mime_0.12 colorspace_2.1-1
[89] scattermore_1.2 tensor_1.5 spatstat.data_3.1-2 utf8_1.2.4 tidyr_1.3.1 generics_0.1.3 data.table_1.15.4 httr_1.4.7
[97] htmlwidgets_1.6.4 S4Arrays_1.4.1 uwot_0.2.2 pkgconfig_2.0.3 gtable_0.3.5 lmtest_0.9-40 XVector_0.44.0 htmltools_0.5.8.1
[105] profvis_0.3.8 dotCall64_1.1-1 TMB_1.9.14 scales_1.3.0 Biobase_2.64.0 png_0.1-8 spatstat.univar_3.0-0 rstudioapi_0.16.0
[113] reshape2_1.4.4 nlme_3.1-166 curl_5.2.1 nloptr_2.1.1 cachem_1.1.0 zoo_1.8-12 stringr_1.5.1 KernSmooth_2.23-24
[121] parallel_4.4.1 miniUI_0.1.1.1 desc_1.4.3 pillar_1.9.0 grid_4.4.1 vctrs_0.6.5 RANN_2.6.1 urlchecker_1.0.1
[129] promises_1.3.0 xtable_1.8-4 cluster_2.1.6 cli_3.6.3 locfit_1.5-9.10 compiler_4.4.1 rlang_1.1.4 crayon_1.5.3
[137] future.apply_1.11.2 ps_1.7.7 forcats_1.0.0 plyr_1.8.9 fs_1.6.4 stringi_1.8.4 viridisLite_0.4.2 deldir_2.0-4
[145] BiocParallel_1.38.0 babelgene_22.9 lmerTest_3.1-3 munsell_0.5.1 lazyeval_0.2.2 devtools_2.4.5 spatstat.geom_3.3-2 Matrix_1.7-0
[153] RcppHNSW_0.6.0 patchwork_1.2.0 future_1.34.0 ggplot2_3.5.1 statmod_1.5.0 shiny_1.9.1 SummarizedExperiment_1.34.0 ROCR_1.0-11
[161] igraph_2.0.3 memoise_2.0.1

AlanTeoYueYang commented 3 weeks ago

Hi, it should be fixed. Apologies for the bug.

yecotoo commented 3 weeks ago

Hi, it should be fixed. Apologies for the bug.

Thanks! Sorry for that, something new may occur, which I met before. This is an old problem. It occured now. I have checked my expr seuratObject, and meta, the colname is "cell_type". So I don't know why it can't identify my cell_type_col? What's the reason may be? Please give me a reply, thanks! libra_result = run_de(expr, meta = meta,