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 in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[<-': default method not implemented for type 'S4' #725

Open
chaiepi opened this issue Jun 7, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@chaiepi
Copy link

chaiepi commented Jun 7, 2024

Describe the bug
Running the example in monocle3, and cluster_cells() function reports an error: Error in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[<-': default method not implemented for type 'S4'

To Reproduce
The code that produced the bug:
cell_metadata <- readRDS(system.file('extdata',
'worm_embryo/worm_embryo_coldata.rds',
package='monocle3'))
gene_metadata <- readRDS(system.file('extdata',
'worm_embryo/worm_embryo_rowdata.rds',
package='monocle3'))
expression_matrix <- readRDS(system.file('extdata',
'worm_embryo/worm_embryo_expression_matrix.rds',
package='monocle3'))

cds <- new_cell_data_set(expression_data=expression_matrix,
cell_metadata=cell_metadata,
gene_metadata=gene_metadata)

cds <- preprocess_cds(cds)
cds <- reduce_dimension(cds)
cds <- cluster_cells(cds)

traceback()
traceback()
5: h(simpleError(msg, call))
4: .handleSimpleError(function (cond)
.Internal(C_tryCatchHelper(addr, 1L, cond)), "default method not implemented for type 'S4'",
base::quote(is.nan(num_links)))
3: [<-(*tmp*, is.nan(num_links), value = 0)
2: compute_partitions(cluster_result$g, cluster_result$optim_res,
partition_qval, verbose)
1: cluster_cells(cds)

sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 8 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.12.so

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

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

other attached packages:
[1] tidyr_1.2.1 dplyr_1.0.10 patchwork_1.1.2 SeuratWrappers_0.3.0
[5] sp_1.5-0 SeuratObject_4.1.1 Seurat_4.1.1 monocle3_1.3.7
[9] SingleCellExperiment_1.18.1 SummarizedExperiment_1.26.1 GenomicRanges_1.48.0 GenomeInfoDb_1.32.4
[13] IRanges_2.30.1 S4Vectors_0.34.0 MatrixGenerics_1.8.1 matrixStats_0.62.0
[17] Biobase_2.56.0 BiocGenerics_0.42.0

loaded via a namespace (and not attached):
[1] plyr_1.8.7 igraph_2.0.3 lazyeval_0.2.2 splines_4.2.1
[5] listenv_0.8.0 scattermore_0.8 usethis_2.1.6 ggplot2_3.3.6
[9] digest_0.6.29 htmltools_0.5.3 fansi_1.0.3 memoise_2.0.1
[13] magrittr_2.0.3 tensor_1.5 cluster_2.1.4 ROCR_1.0-11
[17] remotes_2.4.2 globals_0.16.1 R.utils_2.12.0 spatstat.sparse_2.1-1
[21] prettyunits_1.1.1 colorspace_2.0-3 ggrepel_0.9.1 xfun_0.33
[25] crayon_1.5.1 callr_3.7.2 RCurl_1.98-1.8 jsonlite_1.8.0
[29] lme4_1.1-35.3 progressr_0.11.0 spatstat.data_2.2-0 survival_3.4-0
[33] zoo_1.8-11 glue_1.6.2 polyclip_1.10-0 gtable_0.3.1
[37] zlibbioc_1.42.0 XVector_0.36.0 leiden_0.4.3 DelayedArray_0.22.0
[41] pkgbuild_1.3.1 future.apply_1.9.1 abind_1.4-5 scales_1.2.1
[45] DBI_1.1.3 spatstat.random_2.2-0 miniUI_0.1.1.1 Rcpp_1.0.12
[49] viridisLite_0.4.1 xtable_1.8-4 reticulate_1.26 spatstat.core_2.4-4
[53] rsvd_1.0.5 profvis_0.3.7 htmlwidgets_1.5.4 httr_1.4.4
[57] RColorBrewer_1.1-3 ellipsis_0.3.2 ica_1.0-3 urlchecker_1.0.1
[61] pkgconfig_2.0.3 R.methodsS3_1.8.2 uwot_0.1.14 deldir_1.0-6
[65] utf8_1.2.2 tidyselect_1.1.2 rlang_1.0.5 reshape2_1.4.4
[69] later_1.3.0 cachem_1.0.6 munsell_0.5.0 tools_4.2.1
[73] cli_3.4.0 generics_0.1.3 devtools_2.4.4 ggridges_0.5.3
[77] evaluate_0.16 stringr_1.4.1 fastmap_1.1.0 goftest_1.2-3
[81] processx_3.7.0 fs_1.5.2 knitr_1.40 fitdistrplus_1.1-8
[85] purrr_0.3.4 RANN_2.6.1 sparseMatrixStats_1.8.0 pbapply_1.5-0
[89] future_1.28.0 nlme_3.1-159 mime_0.12 R.oo_1.25.0
[93] compiler_4.2.1 rstudioapi_0.14 plotly_4.10.0 png_0.1-7
[97] spatstat.utils_2.3-1 tibble_3.1.8 stringi_1.7.8 ps_1.7.1
[101] highr_0.9 rgeos_0.5-9 lattice_0.20-45 Matrix_1.5-1
[105] nloptr_2.0.3 vctrs_0.4.1 pillar_1.8.1 lifecycle_1.0.2
[109] BiocManager_1.30.18 spatstat.geom_2.4-0 lmtest_0.9-40 RcppAnnoy_0.0.19
[113] data.table_1.14.2 cowplot_1.1.1 bitops_1.0-7 irlba_2.3.5
[117] httpuv_1.6.6 R6_2.5.1 promises_1.2.0.1 KernSmooth_2.23-20
[121] gridExtra_2.3 parallelly_1.32.1 sessioninfo_1.2.2 codetools_0.2-18
[125] pkgload_1.3.0 boot_1.3-28 MASS_7.3-58.1 assertthat_0.2.1
[129] leidenbase_0.1.25 sctransform_0.3.5 GenomeInfoDbData_1.2.8 mgcv_1.8-40
[133] parallel_4.2.1 grid_4.2.1 rpart_4.1.16 minqa_1.2.4
[137] DelayedMatrixStats_1.18.2 Rtsne_0.16 shiny_1.7.2

@chaiepi chaiepi added the bug Something isn't working label Jun 7, 2024
@pavsol
Copy link

pavsol commented Jul 1, 2024

Having the same issue

@FuduanPeng
Copy link

anyone solved this problem?

@Allanware
Copy link

Having the same issue

1 similar comment
@sqh614
Copy link

sqh614 commented Aug 12, 2024

Having the same issue

@Biometeor
Copy link

The occurrence of this issue is attributed to a submission with the commit (1336cc9). It is regrettable that the developers have not yet addressed this problem. As an immediate workaround, I have temporarily forked the 'moncle3' repository and commented out the problematic sections of the code. For others who urgently require a quick solution, they can utilize the alternative installation method :

devtools::install_github('Biometeor/monocle3', ref="master").

This is a provisional measure, and I earnestly hope that the developers will take notice of this issue and resolve it. Once the issue is resolved, I will remove this forked repository."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants