I am following the Statistical Analysis vignette (https://www.metaboanalyst.ca/resources/vignettes/Statistical_Analysis_Module.html) and have run into issues following the example.
First, everything up to the normalization section runs fine. Downloading the human_cachexia.csv, the SanityCheckData function, etc. Then I run the line:
mSet<-PreparePrenormData(mSet);
Then I run the Normalization function and get the following error:
> mSet<-Normalization(mSet, "NULL", "LogNorm", "MeanCenter", "S10T0", ratio=FALSE, ratioNum=20);
Error in if (substring(mSetObj$dataSet$format, 4, 5) == "mf") { :
argument is of length zero
So I check the mSet object, and mSet$dataSet
is NULL
.
If I go back and start from InitDataObjects
then skip the PreparePrenormData
I can run the Normalization()
step and the plots run fine:
mSet <- PlotNormSummary(mSet, "norm_0_", format ="png", dpi=72, width=NA);
mSet <- PlotSampleNormSummary(mSet, "snorm_0_", format = "png", dpi=72, width=NA);
and produce the plots shown in the vignette. But then when I run the FC.Anal:
mSet<-FC.Anal(mSet, 2.0, 0, FALSE)
mSet$analSet$fc$fc.log
The output for fc.log
is all NaN
.
I did manage somehow once in re-running things, to get actual fold change output, but I haven’t been able to reproduce that again and I’m unsure how to proceed.
Many thanks in advance.
And the sessionInfo()
output is:
R version 4.4.3 (2025-02-28)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.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.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.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: America/Chicago
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_3.5.2 scales_1.4.0 Rserve_1.8-15 MetaboAnalystR_4.0.0
loaded via a namespace (and not attached):
[1] DBI_1.2.3 bitops_1.0-9 pROC_1.18.5 rlang_1.1.6 magrittr_2.0.3
[6] scrime_1.3.5 compiler_4.4.3 RSQLite_2.4.2 vctrs_0.6.5 reshape2_1.4.4
[11] stringr_1.5.1 pkgconfig_2.0.3 fastmap_1.2.0 labeling_0.4.3 caTools_1.18.3
[16] prodlim_2025.04.28 purrr_1.1.0 bit_4.6.0 cachem_1.1.0 jsonlite_2.0.0
[21] recipes_1.3.1 blob_1.2.4 BiocParallel_1.40.2 parallel_4.4.3 R6_2.6.1
[26] stringi_1.8.7 RColorBrewer_1.1-3 qs_0.27.3 limma_3.62.2 parallelly_1.45.0
[31] rpart_4.1.24 lubridate_1.9.4 Rcpp_1.1.0 iterators_1.0.14 future.apply_1.20.0
[36] Matrix_1.7-3 splines_4.4.3 nnet_7.3-20 igraph_2.1.4 timechange_0.3.0
[41] tidyselect_1.2.1 rstudioapi_0.17.1 stringfish_0.17.0 siggenes_1.80.0 timeDate_4041.110
[46] gplots_3.2.0 codetools_0.2-20 listenv_0.9.1 lattice_0.22-7 tibble_3.3.0
[51] plyr_1.8.9 Biobase_2.66.0 withr_3.0.2 future_1.58.0 survival_3.8-3
[56] RcppParallel_5.1.10 pillar_1.11.0 KernSmooth_2.23-26 foreach_1.5.2 stats4_4.4.3
[61] plotly_4.11.0 generics_0.1.4 RApiSerialize_0.1.4 gtools_3.9.5 globals_0.18.0
[66] class_7.3-23 glue_1.8.0 lazyeval_0.2.2 tools_4.4.3 data.table_1.17.8
[71] ModelMetrics_1.2.2.2 fgsea_1.32.4 gower_1.0.2 locfit_1.5-9.12 fastmatch_1.1-6
[76] cowplot_1.2.0 grid_4.4.3 Cairo_1.6-2 impute_1.80.0 tidyr_1.3.1
[81] ipred_0.9-15 edgeR_4.4.2 nlme_3.1-168 crmn_0.0.21 cli_3.6.5
[86] viridisLite_0.4.2 lava_1.8.1 dplyr_1.1.4 glasso_1.11 pcaMethods_1.98.0
[91] gtable_0.3.6 digest_0.6.37 BiocGenerics_0.52.0 caret_7.0-1 htmlwidgets_1.6.4
[96] farver_2.1.2 memoise_2.0.1 htmltools_0.5.8.1 multtest_2.62.0 lifecycle_1.0.4
[101] hardhat_1.4.1 httr_1.4.7 statmod_1.5.0 bit64_4.6.0-1 MASS_7.3-65