monocle3error集合

Error: 'rBind' is defunct. Since

2021-09-01  本文已影响0人  PhageNanoenzyme
**Sorry for post this question here, I am not sure whether it is a bug or something**

**Describe the bug**
Following the instruction on [https://cole-trapnell-lab.github.io/monocle3/docs/starting/](https://cole-trapnell-lab.github.io/monocle3/docs/starting/), I met a error on **graph_test()**:
`Error: 'rBind' is defunct. Since R version 3.2.0, base's rbind() should work fine with S4 objects`
Then I found out the Matrix::rBind is defunct since Matrix 1.3-3 according to [https://cran.r-project.org/web/packages/Matrix/news.html](https://cran.r-project.org/web/packages/Matrix/news.html). So I tried to roll back my Matrix package version and here is how did I do it:
`remove.packages('Matrix')`
`download.file("https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.2-7.tar.gz", dest="Matrix_1.2-7.tar.gz")`
`install.packages("Matrix_1.2-7.tar.gz",repos=NULL,type="source")`
But the **ERROR** repeats itself again.

**To Reproduce**
`cds <- new_cell_data_set(data, cell_metadata = cell_metadata, gene_metadata = gene_annotation)`
`cds <- preprocess_cds(cds, num_dim = 50)`
`cds <- reduce_dimension(cds, preprocess_method = "PCA")`
`cds <- cluster_cells(cds)`
`cds <- learn_graph(cds)`
`cds <- order_cells(cds, root_cells = root.cell)`
`Track_genes <- graph_test(cds, neighbor_graph="principal_graph", cores=1)`

**traceback()**
`5: stop(errorCondition(msg, old = fname, new = new, package = package, class = "defunctError"))`
`4: .Defunct(msg = "'rBind' is defunct.\n Since R version 3.2.0, base's rbind() should work fine with S4 objects")`
`3: Matrix::rBind(tmp, cur_tmp)`
`2: calculateLW(cds, k = k, verbose = verbose, neighbor_graph = neighbor_graph, reduction_method = reduction_method)`
`1: graph_test(cds, neighbor_graph = "principal_graph", cores = 1)`

**Expected behavior**
To Perform differential expression analysis through autocorrelation.

**Screenshots**
None.

**sessionInfo():**
`R version 4.1.0 (2021-05-18) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS`

`Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0`

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

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

`other attached packages: [1] monocle3_1.0.0 SingleCellExperiment_1.14.1 [3] SummarizedExperiment_1.22.0 GenomicRanges_1.44.0 [5] GenomeInfoDb_1.28.0 IRanges_2.26.0 [7] S4Vectors_0.30.0 MatrixGenerics_1.4.0 [9] matrixStats_0.59.0 Biobase_2.52.0 [11] BiocGenerics_0.38.0 forcats_0.5.1 [13] stringr_1.4.0 dplyr_1.0.6 [15] purrr_0.3.4 readr_1.4.0 [17] tidyr_1.1.3 tibble_3.1.2 [19] ggplot2_3.3.3 tidyverse_1.3.1 [21] Matrix_1.2-7 SeuratObject_4.0.2 [23] Seurat_4.0.3`

`loaded via a namespace (and not attached): [1] readxl_1.3.1 backports_1.2.1 plyr_1.8.6 [4] igraph_1.2.6 lazyeval_0.2.2 splines_4.1.0 [7] listenv_0.8.0 scattermore_0.7 usethis_2.0.1 [10] digest_0.6.27 htmltools_0.5.1.1 viridis_0.6.1 [13] fansi_0.5.0 magrittr_2.0.1 memoise_2.0.0 [16] tensor_1.5 cluster_2.1.2 ROCR_1.0-11 [19] remotes_2.4.0 globals_0.14.0 modelr_0.1.8 [22] spatstat.sparse_2.0-0 prettyunits_1.1.1 colorspace_2.0-1 [25] rvest_1.0.0 ggrepel_0.9.1 haven_2.4.1 [28] callr_3.7.0 crayon_1.4.1 RCurl_1.98-1.3 [31] jsonlite_1.7.2 spatstat.data_2.1-0 survival_3.2-11 [34] zoo_1.8-9 glue_1.4.2 polyclip_1.10-0 [37] gtable_0.3.0 zlibbioc_1.38.0 XVector_0.32.0 [40] leiden_0.3.8 DelayedArray_0.18.0 pkgbuild_1.2.0 [43] future.apply_1.7.0 abind_1.4-5 scales_1.1.1 [46] DBI_1.1.1 miniUI_0.1.1.1 Rcpp_1.0.6 [49] viridisLite_0.4.0 xtable_1.8-4 reticulate_1.20 [52] spatstat.core_2.1-2 htmlwidgets_1.5.3 httr_1.4.2 [55] RColorBrewer_1.1-2 ellipsis_0.3.2 ica_1.0-2 [58] pkgconfig_2.0.3 uwot_0.1.10 dbplyr_2.1.1 [61] deldir_0.2-10 utf8_1.2.1 tidyselect_1.1.1 [64] rlang_0.4.11 reshape2_1.4.4 later_1.2.0 [67] cachem_1.0.5 munsell_0.5.0 cellranger_1.1.0 [70] tools_4.1.0 cli_2.5.0 generics_0.1.0 [73] devtools_2.4.2 broom_0.7.7 ggridges_0.5.3 [76] fastmap_1.1.0 goftest_1.2-2 processx_3.5.2 [79] fs_1.5.0 fitdistrplus_1.1-5 RANN_2.6.1 [82] pbapply_1.4-3 future_1.21.0 nlme_3.1-152 [85] mime_0.10 xml2_1.3.2 compiler_4.1.0 [88] rstudioapi_0.13 curl_4.3.1 plotly_4.9.4 [91] png_0.1-7 testthat_3.0.2 spatstat.utils_2.2-0 [94] reprex_2.0.0 stringi_1.6.2 ps_1.6.0 [97] desc_1.3.0 lattice_0.20-44 vctrs_0.3.8 [100] pillar_1.6.1 lifecycle_1.0.0 BiocManager_1.30.15 [103] spatstat.geom_2.1-0 lmtest_0.9-38 RcppAnnoy_0.0.18 [106] data.table_1.14.0 cowplot_1.1.1 bitops_1.0-7 [109] irlba_2.3.3 httpuv_1.6.1 patchwork_1.1.1 [112] R6_2.5.0 promises_1.2.0.1 KernSmooth_2.23-20 [115] gridExtra_2.3 parallelly_1.26.0 sessioninfo_1.1.1 [118] codetools_0.2-18 pkgload_1.2.1 MASS_7.3-54 [121] assertthat_0.2.1 rprojroot_2.0.2 withr_2.4.2 [124] sctransform_0.3.2 GenomeInfoDbData_1.2.6 mgcv_1.8-36 [127] hms_1.1.0 grid_4.1.0 rpart_4.1-15 [130] Rtsne_0.15 shiny_1.6.0 lubridate_1.7.10`

**Additional context**
None.

Here I find a good solution from https://groups.google.com/g/monocle-3-users/c/tBjYuAxwyEo

trace('calculateLW', edit = T, where = asNamespace("monocle3"))

change Matrix::rBind to rbind

good luck!

上一篇下一篇

猜你喜欢

热点阅读