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 while running get_expressed_genes #242

Closed
Samir1703 opened this issue Dec 24, 2023 · 5 comments
Closed

Error while running get_expressed_genes #242

Samir1703 opened this issue Dec 24, 2023 · 5 comments

Comments

@Samir1703
Copy link

Hello, I'm a bit new to coding and I'm encountering the following error. I'm following the step by step vignette and after running :

get_expressed_genes from sender and receiver cell types

list_expressed_genes_sender = sender_celltypes %>% unique() %>%
lapply(get_expressed_genes, seurat_object)
expressed_genes_sender = list_expressed_genes_sender %>% unlist() %>% unique()

I get the following error : Error in FUN(X[[i]], ...) :
no slot of name "data" for this object of class "Assay5"

I inspected the seurat object and I do indeed have a slot for data on my object so I'm a bit confused.

@csangara
Copy link
Member

csangara commented Jan 4, 2024

Hi, can you provide me your sessionInfo()? This seems to be a problem with Seurat v5 which we have not fully integrated with.

@Samir1703
Copy link
Author

Hello and happy new year !
Here's the session info

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Paris
tzcode source: internal

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

other attached packages:
[1] nichenetr_2.0.4 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1
[5] dplyr_1.1.4 purrr_1.0.2 readr_2.1.4 tidyr_1.3.0
[9] tibble_3.2.1 ggplot2_3.4.4 tidyverse_2.0.0 Seurat_5.0.1
[13] SeuratObject_5.0.1 sp_2.1-2

loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.21 splines_4.3.2 later_1.3.2
[4] bitops_1.0-7 polyclip_1.10-6 hardhat_1.3.0
[7] pROC_1.18.5 rpart_4.1.21 fastDummies_1.7.3
[10] lifecycle_1.0.4 doParallel_1.0.17 globals_0.16.2
[13] lattice_0.21-9 MASS_7.3-60 backports_1.4.1
[16] magrittr_2.0.3 rmarkdown_2.25 Hmisc_5.1-1
[19] limma_3.58.1 plotly_4.10.3 httpuv_1.6.13
[22] sctransform_0.4.1 spam_2.10-0 spatstat.sparse_3.0-3
[25] reticulate_1.34.0 cowplot_1.1.2 pbapply_1.7-2
[28] RColorBrewer_1.1-3 abind_1.4-5 Rtsne_0.17
[31] BiocGenerics_0.48.1 nnet_7.3-19 tweenr_2.0.2
[34] ipred_0.9-14 circlize_0.4.15 lava_1.7.3
[37] S4Vectors_0.40.2 IRanges_2.36.0 ggrepel_0.9.4
[40] irlba_2.3.5.1 listenv_0.9.0 spatstat.utils_3.0-4
[43] goftest_1.2-3 RSpectra_0.16-1 spatstat.random_3.2-2
[46] fitdistrplus_1.1-11 parallelly_1.36.0 leiden_0.4.3.1
[49] codetools_0.2-19 ggforce_0.4.1 shape_1.4.6
[52] tidyselect_1.2.0 farver_2.1.1 base64enc_0.1-3
[55] matrixStats_1.2.0 stats4_4.3.2 spatstat.explore_3.2-5
[58] jsonlite_1.8.8 caret_6.0-94 GetoptLong_1.0.5
[61] e1071_1.7-14 Formula_1.2-5 ellipsis_0.3.2
[64] progressr_0.14.0 ggridges_0.5.5 survival_3.5-7
[67] iterators_1.0.14 foreach_1.5.2 tools_4.3.2
[70] ggnewscale_0.4.9 ica_1.0-3 Rcpp_1.0.11
[73] glue_1.6.2 prodlim_2023.08.28 gridExtra_2.3
[76] xfun_0.41 mgcv_1.9-0 withr_2.5.2
[79] fastmap_1.1.1 fansi_1.0.6 caTools_1.18.2
[82] digest_0.6.33 timechange_0.2.0 R6_2.5.1
[85] mime_0.12 colorspace_2.1-0 scattermore_1.2
[88] tensor_1.5 spatstat.data_3.0-3 DiagrammeR_1.0.10
[91] utf8_1.2.4 generics_0.1.3 data.table_1.14.10
[94] recipes_1.0.9 class_7.3-22 httr_1.4.7
[97] htmlwidgets_1.6.4 uwot_0.1.16 ModelMetrics_1.2.2.2
[100] pkgconfig_2.0.3 gtable_0.3.4 timeDate_4032.109
[103] ComplexHeatmap_2.18.0 lmtest_0.9-40 shadowtext_0.1.2
[106] htmltools_0.5.7 dotCall64_1.1-1 clue_0.3-65
[109] scales_1.3.0 png_0.1-8 gower_1.0.1
[112] knitr_1.45 rstudioapi_0.15.0 tzdb_0.4.0
[115] reshape2_1.4.4 rjson_0.2.21 checkmate_2.3.1
[118] visNetwork_2.1.2 nlme_3.1-163 proxy_0.4-27
[121] zoo_1.8-12 GlobalOptions_0.1.2 KernSmooth_2.23-22
[124] parallel_4.3.2 miniUI_0.1.1.1 vipor_0.4.7
[127] foreign_0.8-85 ggrastr_1.0.2 pillar_1.9.0
[130] grid_4.3.2 vctrs_0.6.5 RANN_2.6.1
[133] randomForest_4.7-1.1 promises_1.2.1 xtable_1.8-4
[136] cluster_2.1.4 htmlTable_2.4.2 beeswarm_0.4.0
[139] evaluate_0.23 cli_3.6.2 compiler_4.3.2
[142] rlang_1.1.2 crayon_1.5.2 future.apply_1.11.1
[145] fdrtool_1.2.17 labeling_0.4.3 plyr_1.8.9
[148] ggbeeswarm_0.7.2 stringi_1.8.3 viridisLite_0.4.2
[151] deldir_2.0-2 munsell_0.5.0 lazyeval_0.2.2
[154] spatstat.geom_3.2-7 Matrix_1.6-4 RcppHNSW_0.5.0
[157] hms_1.1.3 patchwork_1.1.3 future_1.33.1
[160] statmod_1.5.0 shiny_1.8.0 ROCR_1.0-11
[163] igraph_1.6.0

@csangara
Copy link
Member

Thanks for providing your session.

I implemented a fix in the "get-expressed-genes" branch, which you can already install using

devtools::install_github("saeyslab/nichenetr", ref="get-expressed-genes")

I haven't fully tested it on all scenarios yet, but it should work on the vignette now. I'll push it to the main branch once I have more time to run tests on it.

Let me know if you still have errors!

@csangara
Copy link
Member

@godstick0517
@Samir1703

This has now been merged with the master branch. Feel free to reinstall NicheNet to version 2.0.5 now. When I posted the previous comment, I swapped the order of the arguments because I thought it was better practice to have the main (Seurat) object as the first argument (#247). However, I decided to rewrite this again so that it wouldn't break the current vignettes (#250). Sorry if this ends up breaking your code.

@Samir1703
Copy link
Author

Thank you so much !!! I will try to do run it again and will let you know how it goes

Best

Samir

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

2 participants