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

Question about [my question]Error in !CheckWGCNAName(seurat_obj, wgcna_name) : invalid argument type #334

Open
RGT183 opened this issue Nov 15, 2024 · 5 comments
Labels
question Further information is requested

Comments

@RGT183
Copy link

RGT183 commented Nov 15, 2024

When I used ModuleEigengenes, the questtion is this
seurat_obj <- ModuleEigengenes(

  • seurat_obj,
  • group.by.vars="sample"
  • )
    Error in !CheckWGCNAName(seurat_obj, wgcna_name) : invalid argument type
    Then, I re-install the package and try, also don't work
    sessionInfo()
    R version 4.4.2 (2024-10-31 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
[2] LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C
[5] 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] hdWGCNA_0.3.00 igraph_2.1.1 ggrepel_0.9.6
[4] harmony_1.2.1 Rcpp_1.0.13-1 WGCNA_1.73
[7] fastcluster_1.2.6 dynamicTreeCut_1.63-1 patchwork_1.3.0
[10] cowplot_1.1.3 lubridate_1.9.3 forcats_1.0.0
[13] stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2
[16] readr_2.1.5 tidyr_1.3.1 tibble_3.2.1
[19] ggplot2_3.5.1 tidyverse_2.0.0 Seurat_5.1.0
[22] SeuratObject_5.0.2 sp_2.1-4

loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.22 splines_4.4.2 later_1.3.2
[4] polyclip_1.10-7 preprocessCore_1.68.0 rpart_4.1.23
[7] fastDummies_1.7.4 lifecycle_1.0.4 doParallel_1.0.17
[10] globals_0.16.3 lattice_0.22-6 MASS_7.3-61
[13] backports_1.5.0 magrittr_2.0.3 rmarkdown_2.29
[16] Hmisc_5.2-0 plotly_4.10.4 remotes_2.5.0
[19] httpuv_1.6.15 sctransform_0.4.1 spam_2.11-0
[22] sessioninfo_1.2.2 pkgbuild_1.4.5 spatstat.sparse_3.1-0
[25] reticulate_1.39.0 pbapply_1.7-2 DBI_1.2.3
[28] RColorBrewer_1.1-3 zlibbioc_1.52.0 abind_1.4-8
[31] pkgload_1.4.0 Rtsne_0.17 BiocGenerics_0.52.0
[34] nnet_7.3-19 GenomeInfoDbData_1.2.13 IRanges_2.40.0
[37] S4Vectors_0.44.0 irlba_2.3.5.1 listenv_0.9.1
[40] spatstat.utils_3.1-1 goftest_1.2-3 RSpectra_0.16-2
[43] spatstat.random_3.3-2 fitdistrplus_1.2-1 parallelly_1.39.0
[46] commonmark_1.9.2 leiden_0.4.3.1 codetools_0.2-20
[49] xml2_1.3.6 tidyselect_1.2.1 UCSC.utils_1.2.0
[52] farver_2.1.2 tester_0.2.0 base64enc_0.1-3
[55] matrixStats_1.4.1 stats4_4.4.2 spatstat.explore_3.3-3
[58] jsonlite_1.8.9 Formula_1.2-5 ellipsis_0.3.2
[61] progressr_0.15.0 ggridges_0.5.6 survival_3.7-0
[64] iterators_1.0.14 foreach_1.5.2 tools_4.4.2
[67] ica_1.0-3 glue_1.8.0 gridExtra_2.3
[70] xfun_0.49 usethis_3.0.0 GenomeInfoDb_1.42.0
[73] withr_3.0.2 BiocManager_1.30.25 fastmap_1.2.0
[76] fansi_1.0.6 digest_0.6.37 timechange_0.3.0
[79] R6_2.5.1 mime_0.12 colorspace_2.1-1
[82] scattermore_1.2 GO.db_3.20.0 tensor_1.5
[85] spatstat.data_3.1-2 RSQLite_2.3.7 RhpcBLASctl_0.23-42
[88] utf8_1.2.4 generics_0.1.3 data.table_1.16.2
[91] FNN_1.1.4.1 httr_1.4.7 htmlwidgets_1.6.4
[94] uwot_0.2.2 pkgconfig_2.0.3 gtable_0.3.6
[97] blob_1.2.4 impute_1.80.0 lmtest_0.9-40
[100] XVector_0.46.0 htmltools_0.5.8.1 profvis_0.4.0
[103] dotCall64_1.2 scales_1.3.0 Biobase_2.66.0
[106] png_0.1-8 spatstat.univar_3.1-1 knitr_1.49
[109] rstudioapi_0.17.1 tzdb_0.4.0 reshape2_1.4.4
[112] checkmate_2.3.2 nlme_3.1-166 curl_6.0.0
[115] proxy_0.4-27 cachem_1.1.0 zoo_1.8-12
[118] KernSmooth_2.23-24 parallel_4.4.2 miniUI_0.1.1.1
[121] foreign_0.8-87 AnnotationDbi_1.68.0 pillar_1.9.0
[124] grid_4.4.2 vctrs_0.6.5 RANN_2.6.2
[127] urlchecker_1.0.1 promises_1.3.0 xtable_1.8-4
[130] cluster_2.1.6 htmlTable_2.4.3 evaluate_1.0.1
[133] cli_3.6.3 compiler_4.4.2 rlang_1.1.4
[136] crayon_1.5.3 future.apply_1.11.3 labeling_0.4.3
[139] plyr_1.8.9 fs_1.6.5 stringi_1.8.4
[142] viridisLite_0.4.2 deldir_2.0-4 munsell_0.5.1
[145] Biostrings_2.74.0 lazyeval_0.2.2 devtools_2.4.5
[148] spatstat.geom_3.3-3 Matrix_1.7-1 RcppHNSW_0.6.0
[151] hms_1.1.3 bit64_4.5.2 future_1.34.0
[154] KEGGREST_1.46.0 shiny_1.9.1 ROCR_1.0-11
[157] memoise_2.0.1 bit_4.5.0

@RGT183 RGT183 added the question Further information is requested label Nov 15, 2024
@smorabit
Copy link
Owner

Can you please update hdWGCNA to the latest version and run it again?

@Clapton9527
Copy link

Hi! I have the same problem

RNA <- ModuleEigengenes( RNA, group.by.vars="orig.ident" )
Error in !CheckWGCNAName(seurat_obj, wgcna_name) : invalid argument type

sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 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_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Asia/Shanghai
tzcode source: system (glibc)

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

other attached packages:
[1] hdWGCNA_0.4.00 igraph_1.5.1 WGCNA_1.73
[4] fastcluster_1.2.3 dynamicTreeCut_1.63-1 scran_1.28.2
[7] scater_1.28.0 scuttle_1.10.2 scales_1.2.1
[10] miloR_1.8.1 edgeR_3.42.4 limma_3.56.2
[13] GSEABase_1.62.0 graph_1.78.0 annotate_1.78.0
[16] XML_3.99-0.14 GSVA_1.48.3 pheatmap_1.0.12
[19] gplots_3.1.3 ggstatsplot_0.12.0 survminer_0.4.9
[22] survival_3.5-7 COSG_0.9.0 tinyarray_2.4.2
[25] msigdbr_7.5.1 TCGAbiolinks_2.28.3 circlize_0.4.15
[28] RColorBrewer_1.1-3 ComplexHeatmap_2.16.0 tictoc_1.2
[31] Startrac_0.1.0 viridis_0.6.4 viridisLite_0.4.2
[34] ggpubr_0.6.0 ggrepel_0.9.3 sscVis_0.1.0
[37] SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2 GenomicRanges_1.52.0
[40] GenomeInfoDb_1.36.3 MatrixGenerics_1.12.3 matrixStats_1.0.0
[43] plyr_1.8.8 data.table_1.14.8 clusterProfiler_4.8.3
[46] org.Hs.eg.db_3.17.0 AnnotationDbi_1.62.2 IRanges_2.34.1
[49] S4Vectors_0.38.1 ClusterGVis_0.1.1 monocle_2.28.0
[52] DDRTree_0.1.5 irlba_2.3.5.1 VGAM_1.1-8
[55] Biobase_2.60.0 BiocGenerics_0.46.0 Matrix_1.6-1
[58] scRNAtoolVis_0.0.7 lubridate_1.9.2 forcats_1.0.0
[61] purrr_1.0.2 tidyr_1.3.0 tibble_3.2.1
[64] tidyverse_2.0.0 qs_0.27.2 readr_2.1.4
[67] reshape2_1.4.4 patchwork_1.1.3 dplyr_1.1.3
[70] clustree_0.5.0 ggraph_2.1.0 harmony_1.2.1
[73] Rcpp_1.0.11 stringr_1.5.0 magrittr_2.0.3
[76] cowplot_1.1.1 ggplot2_3.4.3 SeuratObject_4.1.3
[79] Seurat_4.3.0.1

loaded via a namespace (and not attached):
[1] DBI_1.1.3 httr_1.4.7 BiocParallel_1.34.2
[4] prettyunits_1.1.1 yulab.utils_0.0.9 ggplotify_0.1.2
[7] sparseMatrixStats_1.12.2 spatstat.geom_3.2-5 babelgene_22.9
[10] survMisc_0.5.6 pillar_1.9.0 R6_2.5.1
[13] boot_1.3-28.1 mime_0.12 correlation_0.8.4
[16] reticulate_1.31 uwot_0.1.16 Rhdf5lib_1.22.0
[19] libcoin_1.0-9 ROCR_1.0-11 Hmisc_5.1-0
[22] rprojroot_2.0.3 fields_15.2 downloader_0.4
[25] KMsurv_0.1-5 parallelly_1.36.0 GlobalOptions_0.1.2
[28] sparsesvd_0.2-2 FNN_1.1.3.2 caTools_1.18.2
[31] polyclip_1.10-4 beachmat_2.16.0 htmltools_0.5.6
[34] fansi_1.0.4 lambda.r_1.2.4 remotes_2.4.2.1
[37] datawizard_0.8.0 fastICA_1.2-3 car_3.1-2
[40] stringfish_0.16.0 fgsea_1.26.0 spatstat.utils_3.1-0
[43] HDO.db_0.99.1 maps_3.4.1 rpart_4.1.19
[46] clue_0.3-64 qlcMatrix_0.9.7 scatterpie_0.2.1
[49] fitdistrplus_1.1-11 goftest_1.2-3 tidyselect_1.2.0
[52] RSQLite_2.3.1 GenomeInfoDbData_1.2.10 utf8_1.2.3
[55] ScaledMatrix_1.8.1 scattermore_1.2 sessioninfo_1.2.2
[58] spatstat.data_3.0-1 gridExtra_2.3 fs_1.6.3
[61] rvest_1.0.3 sctransform_0.4.1 future.apply_1.11.0
[64] vipor_0.4.5 Rtsne_0.16 DelayedMatrixStats_1.22.6
[67] TCGAbiolinksGUI.data_1.20.0 lazyeval_0.2.2 carData_3.0-5
[70] munsell_0.5.0 treeio_1.24.3 profvis_0.3.8
[73] pracma_2.4.2 bitops_1.0-7 labeling_0.4.3
[76] KEGGREST_1.40.0 promises_1.2.1 shape_1.4.6
[79] rhdf5filters_1.12.1 terra_1.7-46 zoo_1.8-12
[82] locfit_1.5-9.8 DelayedArray_0.26.7 multcomp_1.4-25
[85] paletteer_1.5.0 tools_4.3.1 ape_5.7-1
[88] processx_3.8.2 insight_0.19.3 shiny_1.7.5
[91] BiocFileCache_2.8.0 rlang_1.1.1 generics_0.1.3
[94] BiocSingular_1.16.0 ggridges_0.5.4 MetaGxBreast_1.20.0
[97] evaluate_0.21 bayestestR_0.13.1 devtools_2.4.5
[100] colorspace_2.1-0 ellipsis_0.3.2 withr_2.5.0
[103] RCurl_1.98-1.12 futile.logger_1.4.3 statsExpressions_1.5.1
[106] xtable_1.8-4 lme4_1.1-34 aplot_0.2.0
[109] ks_1.14.1 mclust_6.0.0 httpuv_1.6.11
[112] copykat_1.1.0 rmarkdown_2.24 metapod_1.8.0
[115] MASS_7.3-60 dqrng_0.3.1 docopt_0.7.1
[118] broom_1.0.5 deldir_1.0-9 GO.db_3.17.0
[121] sandwich_3.0-2 rhdf5_2.44.0 tensor_1.5
[124] vctrs_0.6.3 lifecycle_1.0.3 proxy_0.4-27
[127] codetools_0.2-19 nlme_3.1-163 combinat_0.0-8
[130] future_1.33.0 progress_1.2.2 dbplyr_2.3.3
[133] pkgload_1.3.2.1 rstudioapi_0.15.0 stringi_1.7.12
[136] hms_1.1.3 pbapply_1.7-2 minqa_1.2.5
[139] tester_0.1.7 cachem_1.0.8 BiocManager_1.30.22
[142] tidytree_0.4.5 listenv_0.9.0 XVector_0.40.0
[145] ggrastr_1.0.2 urlchecker_1.0.1 plotly_4.10.2
[148] ggtree_3.8.2 enrichplot_1.20.1 ExperimentHub_2.8.1
[151] GetoptLong_1.0.5 pkgbuild_1.4.2 ggfun_0.1.2
[154] HDF5Array_1.28.1 ggsci_3.0.0 htmlwidgets_1.6.2
[157] Formula_1.2-5 interactiveDisplayBase_1.38.0 dendextend_1.17.1
[160] memoise_2.0.1 crayon_1.5.2 gridGraphics_0.5-1
[163] rappdirs_0.3.3 S4Arrays_1.0.6 xml2_1.3.5
[166] filelock_1.0.2 preprocessCore_1.62.1 GOSemSim_2.26.1
[169] png_0.1-8 progressr_0.14.0 tzdb_0.4.0
[172] emmeans_1.8.8 infercnv_1.16.0 fastmap_1.1.1
[175] coda_0.19-4 tidygraph_1.2.3 pkgconfig_2.0.3
[178] cli_3.6.1 beeswarm_0.4.0 DOSE_3.26.1
[181] ggforce_0.4.1 ps_1.7.5 ggsignif_0.6.4
[184] nnet_7.3-19 gridBase_0.4-7 zeallot_0.1.0
[187] ggalluvial_0.12.5 lmtest_0.9-40 BiocVersion_3.17.1
[190] usethis_2.2.2 RcppAnnoy_0.0.21 DoubletFinder_2.0.3
[193] argparse_2.2.2 slam_0.1-50 timechange_0.2.0
[196] rjags_4-14 ggdendro_0.1.23 foreign_0.8-84
[199] blob_1.2.4 impute_1.74.1 globals_0.16.2
[202] ggbeeswarm_0.7.2 knitr_1.43 ica_1.0-3
[205] spam_2.9-1 compiler_4.3.1 rjson_0.2.21
[208] RcppParallel_5.1.7 biomaRt_2.56.1 bit_4.0.5
[211] leidenbase_0.1.25 AnnotationHub_3.8.0 BiocNeighbors_1.18.0
[214] glue_1.6.2 sp_2.0-0 estimability_1.4.1
[217] formatR_1.14 parameters_0.21.1 digest_0.6.33
[220] leiden_0.4.3 graphlayouts_1.0.0 foreach_1.5.2
[223] RApiSerialize_0.1.4 spatstat.random_3.1-5 zlibbioc_1.46.0
[226] dotCall64_1.0-2 tweenr_2.0.2 lattice_0.21-8
[229] statmod_1.5.0 rsvd_1.0.5 gson_0.1.0
[232] nloptr_2.0.3 mvtnorm_1.2-3 yaml_2.3.7
[235] qvalue_2.32.0 later_1.3.1 modeltools_0.2-23
[238] backports_1.4.1 rstatix_0.7.2 moduleColor_1.8-4
[241] shadowtext_0.1.2 parallel_4.3.1 rematch2_2.1.2
[244] parallelDist_0.2.6 miniUI_0.1.1.1 gtable_0.3.4
[247] abind_1.4-5 xfun_0.40 Biostrings_2.68.1
[250] curl_5.0.2 callr_3.7.3 doParallel_1.0.17
[253] KernSmooth_2.23-22 futile.options_1.0.1 desc_1.4.2
[256] jsonlite_1.8.7 coin_1.4-2 base64enc_0.1-3
[259] monocle3_1.3.4 iterators_1.0.14 TH.data_1.1-2
[262] RhpcBLASctl_0.23-42 HSMMSingleCell_1.20.0 km.ci_0.5-6
[265] fastmatch_1.1-4 checkmate_2.2.0 gtools_3.9.4
[268] htmlTable_2.4.1 spatstat.sparse_3.0-2 RANN_2.6.1
[271] bluster_1.10.0 phyclust_0.1-34 spatstat.explore_3.2-3
[274] bit64_4.0.5 cluster_2.1.4 farver_2.1.1
[277] org.Mm.eg.db_3.17.0

And I installed the latest version of hdWCGNA as mentioned above hdWGCNA_0.4.00 and run it again.
However, the same problem happened again

@reJELIN
Copy link

reJELIN commented Nov 27, 2024

I'm encoutering the same error at the same step:

Error in !CheckWGCNAName(seurat_obj, wgcna_name) : invalid argument type

i'm with seurat v5 and the last update of your package (0.4.0)

I found a solution. I don't know why but seurat_obj$misc$active_wgcna hasn't been create properly, so i just had to create this variable:

seurat_obj@misc$active_wgcna <- "test"

and it work.

@smorabit
Copy link
Owner

smorabit commented Dec 5, 2024

Is anybody able to provide a reproducible example of this error on the latest version of hdWGCNA? I cannot reproduce it on my side.

@reJELIN
Copy link

reJELIN commented Dec 5, 2024

So I did an singularity environment, I didn't have time to test it in order to see if the error is still there in this configuration. I can't give you any data because it is patient data.

As i said i think it come from a bad initialization of the misc$activate_wgcna variable in the seurat object. Perhaps in my case it is due to the fact that I used previously Seurat v4 for my annotation analysis and you're using Seurat v5 so may be the seurat object is kind working differently with your package.

Again this is working: seurat_obj@misc$active_wgcna <- "your_variable_name"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants