Closed loganminhdang closed 9 months ago
Hi,
I have not personally come across this error but I can probably help if you can provide some more details. Can you explain a bit more about what you did before you ran ModulePreservation
? Did you make sure to run ProjectModules
and SetDatExpr
in the query dataset like we showed in the tutorial?
I am confused when you say:
Would this be related to a disparity in the number of modules between the two modalities of data?
Module preservation is checking whether the co-expression modules that were identified in the reference dataset are preserved in the query dataset, it is not about comparing two different sets of modules to one another.
Closing this issue for now due to inactivity.
Thank you so much for this great package; I have been a fan of WGCNA for a long time. While running the ModulePreservation step for my cross-modality data (single-cell RNA-seq and single-cell ATAC-seq), I received the following error: Error in WGCNA::modulePreservation(multiExpr, ref_modules, referenceNetworks = 1, : Color vector for set 1 does not have the correct number of entries.
I cannot deduce what the error might be related to and have attempted numerous strategies to troubleshoot to no avail. Would this be related to a disparity in the number of modules between the two modalities of data?
The code I used was: seurat_atac <- ModulePreservation( seurat_atac, seurat_ref = seurat_ref, wgcna_name = "Epi_multiome", wgcna_name_ref = "epi_standard", name="Epi-ATAC", verbose=3 )
R session info R version 4.3.2 (2023-10-31) 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_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
time zone: Europe/London tzcode source: system (glibc)
attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base
other attached packages: [1] ggforestplot_0.1.0 igraph_1.6.0 WGCNA_1.72-5 fastcluster_1.2.6
[5] dynamicTreeCut_1.63-1 patchwork_1.1.3 cowplot_1.1.2 lubridate_1.9.3
[9] forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2
[13] readr_2.1.5 tidyr_1.3.0 tibble_3.2.1 tidyverse_2.0.0
[17] EnsDb.Mmusculus.v79_2.99.0 ensembldb_2.26.0 AnnotationFilter_1.26.0 GenomicFeatures_1.54.1
[21] AnnotationDbi_1.64.1 Biobase_2.62.0 hdWGCNA_0.2.26 ggrepel_0.9.4
[25] ggplot2_3.4.4 harmony_1.2.0 Rcpp_1.0.11 SeuratObject_5.0.1
[29] Seurat_4.0.3 Signac_1.12.9004 GenomicRanges_1.54.1 GenomeInfoDb_1.38.5
[33] IRanges_2.36.0 S4Vectors_0.40.2 BiocGenerics_0.48.1