dyno
dyno copied to clipboard
Error with plot_dimred when coloring by a feature
I am receiving the following error:
plot_dimred(model, feature_oi = "Camp", expression_source = object_expression, size_cells = 1, hex_cells = 24, nbins=5, plot_trajectory = FALSE)
Coloring by expression
Error in intI(i, n = d[1], dn[[1]], give.dn = FALSE) :
invalid character indexing
By removing different options, it's an error with "Camp" itself - the specification of the gene.
I've updated to the latest @devel branches of all dyno packages via:
devtools::install_github("dynverse/dyno@devel")
But the error persists. This code worked perfectly well until recently - on the same data currently loaded into the R environment.
> 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=en_IL.UTF-8 LC_NUMERIC=C LC_TIME=en_IL.UTF-8 LC_COLLATE=en_IL.UTF-8 LC_MONETARY=en_IL.UTF-8 LC_MESSAGES=en_IL.UTF-8 LC_PAPER=en_IL.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IL.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggsci_2.9 DAseq_1.0.0 msigdbr_7.4.1 SeuratDisk_0.0.0.9019 SeuratWrappers_0.3.0 wesanderson_0.3.6 reshape2_1.4.4 SingleCellExperiment_1.14.1 dyno_0.2.0
[10] dynwrap_1.2.2 dynplot_1.1.1 dynmethods_1.0.5.9000 dynguidelines_1.0.1 dynfeature_1.0.0 babelwhale_1.0.3 phateR_1.0.7 Rmagic_2.0.3 Matrix_1.3-4
[19] ggplot2_3.3.5 celldex_1.2.0 SingleR_1.6.1 SummarizedExperiment_1.22.0 GenomicRanges_1.44.0 GenomeInfoDb_1.28.1 IRanges_2.26.0 S4Vectors_0.30.0 MatrixGenerics_1.4.0
[28] matrixStats_0.59.0 stringr_1.4.0 SeuratObject_4.0.2 Seurat_4.0.3 Biobase_2.52.0 BiocGenerics_0.38.0
loaded via a namespace (and not attached):
[1] rsvd_1.0.5 ica_1.0-2 zinbwave_1.14.1 class_7.3-19 ps_1.6.0 foreach_1.5.1 lmtest_0.9-38 rprojroot_2.0.2
[9] glmnet_4.1-2 crayon_1.4.1 spatstat.core_2.2-0 MASS_7.3-54 rhdf5filters_1.4.0 nlme_3.1-152 rlang_0.4.11 GA_3.2.1
[17] XVector_0.32.0 caret_6.0-88 ROCR_1.0-11 irlba_2.3.3 callr_3.7.0 limma_3.48.0 phylobase_0.8.10 filelock_1.0.2
[25] BiocParallel_1.26.0 dyndimred_1.0.4 bit64_4.0.5 glue_1.4.2 rngtools_1.5 sctransform_0.3.2 processx_3.5.2 spatstat.sparse_2.0-0
[33] AnnotationDbi_1.54.0 dynutils_1.0.6 spatstat.geom_2.2-0 tidyselect_1.1.1 lmds_0.1.0 usethis_2.0.1 fitdistrplus_1.1-5 XML_3.99-0.6
[41] tidyr_1.1.3 zoo_1.8-9 xtable_1.8-4 magrittr_2.0.1 cli_3.0.0 zlibbioc_1.38.0 rstudioapi_0.13 miniUI_0.1.1.1
[49] rpart_4.1-15 locfdr_1.1-8 shiny_1.6.0 BiocSingular_1.8.0 pkgbuild_1.2.0 cluster_2.1.2 tidygraph_1.2.0 KEGGREST_1.32.0
[57] tibble_3.1.2 interactiveDisplayBase_1.30.0 ggrepel_0.9.1 ape_5.5 listenv_0.8.0 Biostrings_2.60.0 png_0.1-7 future_1.21.0
[65] ipred_0.9-11 withr_2.4.2 bitops_1.0-7 ggforce_0.3.3 ranger_0.12.1 plyr_1.8.6 e1071_1.7-7 pROC_1.17.0.1
[73] pillar_1.6.1 RcppParallel_5.1.4 cachem_1.0.5 fs_1.5.0 hdf5r_1.3.3 kernlab_0.9-29 DelayedMatrixStats_1.14.0 vctrs_0.3.8
[81] ellipsis_0.3.2 generics_0.1.0 lava_1.6.9 devtools_2.4.2 NMF_0.23.0 tools_4.1.0 rncl_0.8.4 munsell_0.5.0
[89] tweenr_1.0.2 proxy_0.4-26 DelayedArray_0.18.0 fastmap_1.1.0 compiler_4.1.0 pkgload_1.2.1 abind_1.4-5 httpuv_1.6.1
[97] ExperimentHub_2.0.0 sessioninfo_1.1.1 pkgmaker_0.32.2 plotly_4.9.4.1 GenomeInfoDbData_1.2.6 prodlim_2019.11.13 gridExtra_2.3 edgeR_3.34.0
[105] lattice_0.20-44 deldir_0.2-10 utf8_1.2.1 later_1.2.0 dplyr_1.0.7 BiocFileCache_2.0.0 recipes_0.1.16 jsonlite_1.7.2
[113] scales_1.1.1 ScaledMatrix_1.0.0 pbapply_1.4-3 sparseMatrixStats_1.4.0 genefilter_1.74.0 lazyeval_0.2.2 promises_1.2.0.1 doParallel_1.0.16
[121] goftest_1.2-2 spatstat.utils_2.2-0 reticulate_1.20 cowplot_1.1.1 Rtsne_0.15 softImpute_1.4-1 uwot_0.1.10 igraph_1.2.6
[129] HDF5Array_1.20.0 proxyC_0.2.0 survival_3.2-11 yaml_2.2.1 carrier_0.1.0 htmltools_0.5.1.1 memoise_2.0.0 locfit_1.5-9.4
[137] graphlayouts_0.7.1 viridisLite_0.4.0 digest_0.6.27 assertthat_0.2.1 mime_0.11 rappdirs_0.3.3 registry_0.5-1 dynparam_1.0.2
[145] RSQLite_2.2.7 future.apply_1.7.0 remotes_2.4.0 data.table_1.14.0 blob_1.2.1 RNeXML_2.4.5 labeling_0.4.2 splines_4.1.0
[153] Rhdf5lib_1.14.0 AnnotationHub_3.0.0 RCurl_1.98-1.3 hms_1.1.0 rhdf5_2.36.0 colorspace_2.0-2 BiocManager_1.30.16 shape_1.4.6
[161] nnet_7.3-16 Rcpp_1.0.6 RANN_2.6.1 fansi_0.5.0 parallelly_1.26.1 ModelMetrics_1.2.2.2 R6_2.5.0 grid_4.1.0
[169] ggridges_0.5.3 lifecycle_1.0.0 curl_4.3.2 leiden_0.3.8 testthat_3.0.4 howmany_0.3-1 desc_1.3.0 RcppAnnoy_0.0.18
[177] RColorBrewer_1.1-2 iterators_1.0.13 gower_0.2.2 htmlwidgets_1.5.3 beachmat_2.8.0 polyclip_1.10-0 purrr_0.3.4 mgcv_1.8-36
[185] globals_0.14.0 patchwork_1.1.1 clusterExperiment_2.12.0 codetools_0.2-18 lubridate_1.7.10 prettyunits_1.1.1 dbplyr_2.1.1 gridBase_0.4-7
[193] gtable_0.3.0 DBI_1.1.1 tensor_1.5 httr_1.4.2 KernSmooth_2.23-20 stringi_1.6.2 progress_1.2.2 farver_2.1.0
[201] uuid_0.1-4 annotate_1.70.0 viridis_0.6.1 timeDate_3043.102 xml2_1.3.2 BiocNeighbors_1.10.0 ade4_1.7-17 readr_1.4.0
[209] scattermore_0.7 BiocVersion_3.13.1 bit_4.0.4 spatstat.data_2.1-0 ggraph_2.0.5 babelgene_21.4 pkgconfig_2.0.3
All other colouring options e.g.:
plot_dimred(model, color_cells = "pseudotime")
Work as expected. And the gene is in the expression object:
which(colnames(object_expression) %in% "Camp")
[1] 289
Any ideas? I can't seem to fix this issue.
Hi @TJonCooper !
Could you provide a reproducible example for me to work with?
Kind regards, Robrecht