Hi all,
For context, I'm still working on the dataset about which I raised this question. Running consensusTOM() results in neither the calibrated nor consensus TOMs being saved to disk/returned to the workspace and throws this error:
Error in .processFileName(calibratedIndividualTOMFilePattern, setNumber = set, : argument "setNames" is missing, with no default
I did run multiExprday <- setNames(multiExprday, c("Time1", "Time2", "Time3"))
and names(multiExprday)
returns them, and anyway, the function seems to be designed to be able to handle missing setNames.
Does anybody have any insight? It smells like a small technical error but I'm having a hard time understanding the source. Thank your for your time.
Command:
consTOM <- consensusTOM(multiExprday,
checkMissingData = TRUE,
maxBlockSize = 25000,
blockSizePenaltyPower = 5,
nPreclusteringCenters = NULL,
randomSeed = 12345,
corType = "bicor",
maxPOutliers = 0.05,
quickCor = 0,
pearsonFallback = "individual",
power = 12,
networkType = "signed",
checkPower = TRUE,
TOMType = "signed",
TOMDenom = "min",
saveIndividualTOMs = TRUE,
individualTOMFileNames = "individualTOM-Set%s-Block%b.RData",
networkCalibration = "full quantile",
saveCalibratedIndividualTOMs = TRUE,
calibratedIndividualTOMFilePattern = "calibratedIndividualTOM-Set%s-Block%b.RData",
calibrationQuantile = 0.95,
sampleForCalibration = TRUE, sampleForCalibrationFactor = 5000,
getNetworkCalibrationSamples = FALSE,
consensusQuantile = 0,
useMean = FALSE,
setWeights = NULL,
saveConsensusTOMs = TRUE,
consensusTOMFilePattern = "consensusTOM-Block%b.RData",
returnTOMs = TRUE,
nThreads = 20,
verbose = 5)
sessionInfo():
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] tximportData_1.10.0 forcats_0.3.0 stringr_1.4.0 dplyr_0.8.0.1
[5] purrr_0.3.0 readr_1.3.1 tidyr_0.8.2 tibble_2.0.1
[9] tidyverse_1.2.1 sva_3.30.1 genefilter_1.64.0 mgcv_1.8-27
[13] nlme_3.1-137 ggplot2_3.1.0 tximport_1.10.1 WGCNA_1.66
[17] fastcluster_1.1.25 dynamicTreeCut_1.63-1 GenomicFeatures_1.34.3 AnnotationDbi_1.44.0
[21] limma_3.38.3 DESeq2_1.22.2 SummarizedExperiment_1.12.0 DelayedArray_0.8.0
[25] BiocParallel_1.16.6 matrixStats_0.54.0 Biobase_2.42.0 GenomicRanges_1.34.0
[29] GenomeInfoDb_1.18.2 IRanges_2.16.0 S4Vectors_0.20.1 BiocGenerics_0.28.0
loaded via a namespace (and not attached):
[1] colorspace_1.4-0 htmlTable_1.13.1 XVector_0.22.0 base64enc_0.1-3
[5] rstudioapi_0.9.0 bit64_0.9-7 lubridate_1.7.4 mvtnorm_1.0-8
[9] xml2_1.2.0 codetools_0.2-16 splines_3.5.2 doParallel_1.0.14
[13] impute_1.56.0 robustbase_0.93-3 geneplotter_1.60.0 knitr_1.21
[17] jsonlite_1.6 Formula_1.2-3 Rsamtools_1.34.1 broom_0.5.1
[21] annotate_1.60.0 cluster_2.0.7-1 GO.db_3.7.0 rrcov_1.4-7
[25] compiler_3.5.2 httr_1.4.0 backports_1.1.3 assertthat_0.2.0
[29] Matrix_1.2-15 lazyeval_0.2.1 cli_1.0.1 acepack_1.4.1
[33] htmltools_0.3.6 prettyunits_1.0.2 tools_3.5.2 gtable_0.2.0
[37] glue_1.3.0 GenomeInfoDbData_1.2.0 Rcpp_1.0.0 cellranger_1.1.0
[41] Biostrings_2.50.2 preprocessCore_1.44.0 rtracklayer_1.42.1 iterators_1.0.10
[45] xfun_0.4 rvest_0.3.2 XML_3.98-1.17 DEoptimR_1.0-8
[49] zlibbioc_1.28.0 MASS_7.3-51.1 scales_1.0.0 hms_0.4.2
[53] RColorBrewer_1.1-2 yaml_2.2.0 memoise_1.1.0 gridExtra_2.3
[57] biomaRt_2.38.0 rpart_4.1-13 latticeExtra_0.6-28 stringi_1.3.1
[61] RSQLite_2.1.1 pcaPP_1.9-73 foreach_1.4.4 checkmate_1.9.1
[65] rlang_0.3.1 pkgconfig_2.0.2 bitops_1.0-6 evaluate_0.13
[69] lattice_0.20-38 GenomicAlignments_1.18.1 htmlwidgets_1.3 bit_1.1-14
[73] tidyselect_0.2.5 robust_0.4-18 plyr_1.8.4 magrittr_1.5
[77] R6_2.4.0 generics_0.0.2 Hmisc_4.2-0 fit.models_0.5-14
[81] DBI_1.0.0 haven_2.0.0 pillar_1.3.1 foreign_0.8-71
[85] withr_2.1.2 survival_2.43-3 RCurl_1.95-4.11 nnet_7.3-12
[89] modelr_0.1.3 crayon_1.3.4 rmarkdown_1.11 progress_1.2.0
[93] readxl_1.3.0 locfit_1.5-9.1 grid_3.5.2 data.table_1.12.0
[97] blob_1.1.1 digest_0.6.18 xtable_1.8-3 munsell_0.5.0
Thanks so much for the quick response! I downloaded and installed 1.66; it's running now, and I'll update this post when the job finishes, likely tomorrow.
quick edit: It killed the function with
edit 2: .traceback():
I think I may have found the issue:
The function in consensusTOM.R in the documentation seems to pass 18 arguments to tomSimilarity_call in networkFunctions.c, but in the updated version, it passes 19 arguments
In the updated networkFunctions.c, the argument correspondingly takes 19 arguments:
And it seems to expect 19 arguments further down in networkFunctions.c
The old version of WGCNA is unloaded and uninstalled, so I'm not clear on what is still expecting 18 arguments. Is it calling a function in another file that I'm missing? (Sorry, I don't really know C...) Thank you!
Strange. The function consensusTOM works in my installation. I would double-check that the new package was compiled and installed from source and that there is no confusion between a system-wide and personal library. It does look like your installation mixes new R code with old compiled code.
Ah yeah, it was a discrepancy in my .profile. Fixed now and the function works - thanks so much for your help!
Glad you got it worked out.