Hi,
Thank you for the wonderful package its extensive documentation!
I am trying to reproduce the example from the variancePartition documentation page for voomWithDreamWeights() “Transform RNA-Seq Data Ready for Linear Mixed Modelling with dream()”. Even running the example code exactly as shown results in the following error:
Error in .fitVarPartModel(exprObj, formula, data, REML = REML, useWeights = useWeights, : All models failed. The first model fails with: Error in FUN(...): (converted from warning) partial argument match of 'form' to 'formula'
Code to reproduce:
library(variancePartition)
library(edgeR)
library(BiocParallel)
data(varPartDEdata)
dge <- DGEList(counts = countMatrix)
dge <- calcNormFactors(dge)
# Formula from the vignette
form <- ~ Disease + (1 | Individual)
# Attempt 1: using variable 'form'
vobj <- voomWithDreamWeights(dge[1:20, ], form, metadata)
# Attempt 2: explicit 'formula' argument
vobj <- voomWithDreamWeights(dge[1:20, ], formula = form, data = metadata)
# Attempt 3: force stats::as.formula
vobj <- variancePartition::voomWithDreamWeights(
dge[1:20, ],
stats::as.formula(~ Disease + (1 | Individual)),
metadata
)
All three attempts produce the same error.
Checks and observations
- metadata contains the required columns:
colnames(metadata)
# [1] "Individual" "Disease" "Experiment" "Sex" "DiseaseSubtype"
- getOption("warn") returns 0 (default), so global warning settings are not causing the error.
I also tested a formula with only fixed effects:
form <- ~ Disease
vobj <- voomWithDreamWeights(dge[1:20, ], form, metadata, quiet = FALSE)
This runs successfully and returns an object of class EList.
A warning appears:
Warning message:
In fit$coef : partial match of 'coef' to 'coefficients'
It works for fixed effects and the error is triggered when including the random effect.
Session Info
session_info()
─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.4.3 Patched (2025-02-28 r88218)
os Rocky Linux 9.4 (Blue Onyx)
system x86_64, linux-gnu
ui X11
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz US/Eastern
date 2025-11-12
quarto NA
─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
aod 1.3.3 2023-12-13 [1] CRAN (R 4.4.2)
backports 1.5.0 2024-05-23 [2] CRAN (R 4.4.0)
Biobase 2.66.0 2024-10-29 [2] Bioconductor 3.20 (R 4.4.2)
BiocGenerics 0.52.0 2024-10-29 [2] Bioconductor 3.20 (R 4.4.2)
BiocParallel * 1.40.2 2025-04-10 [2] Bioconductor
bitops 1.0-9 2024-10-03 [2] CRAN (R 4.4.1)
boot 1.3-31 2024-08-28 [3] CRAN (R 4.4.3)
brio 1.1.5 2024-04-24 [2] CRAN (R 4.4.0)
broom 1.0.8 2025-03-28 [2] CRAN (R 4.4.3)
cachem 1.1.0 2024-05-16 [2] CRAN (R 4.4.0)
caTools 1.18.3 2024-09-04 [2] CRAN (R 4.4.1)
cli 3.6.5 2025-04-23 [2] CRAN (R 4.4.3)
codetools 0.2-20 2024-03-31 [3] CRAN (R 4.4.3)
colorout * 1.3-2 2024-12-10 [1] Github (jalvesaq/colorout@2a5f214)
corpcor 1.6.10 2021-09-16 [2] CRAN (R 4.4.0)
devtools * 2.4.5 2022-10-11 [2] CRAN (R 4.4.0)
dichromat 2.0-0.1 2022-05-02 [2] CRAN (R 4.4.0)
digest 0.6.37 2024-08-19 [2] CRAN (R 4.4.1)
dplyr 1.1.4 2023-11-17 [2] CRAN (R 4.4.0)
edgeR * 4.4.2 2025-01-27 [2] Bioconductor 3.20 (R 4.4.2)
ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.4.0)
EnvStats 3.1.0 2025-04-24 [1] CRAN (R 4.4.3)
fANCOVA 0.6-1 2020-11-13 [1] CRAN (R 4.4.2)
farver 2.1.2 2024-05-13 [2] CRAN (R 4.4.0)
fastmap 1.2.0 2024-05-15 [2] CRAN (R 4.4.0)
fs 1.6.6 2025-04-12 [2] CRAN (R 4.4.3)
generics 0.1.4 2025-05-09 [2] CRAN (R 4.4.3)
ggplot2 * 3.5.2 2025-04-09 [2] CRAN (R 4.4.3)
glue 1.8.0 2024-09-30 [2] CRAN (R 4.4.1)
gplots 3.2.0 2024-10-05 [2] CRAN (R 4.4.1)
gtable 0.3.6 2024-10-25 [2] CRAN (R 4.4.2)
gtools 3.9.5 2023-11-20 [2] CRAN (R 4.4.0)
htmltools 0.5.8.1 2024-04-04 [2] CRAN (R 4.4.0)
htmlwidgets 1.6.4 2023-12-06 [2] CRAN (R 4.4.0)
httpuv 1.6.16 2025-04-16 [2] CRAN (R 4.4.3)
iterators 1.0.14 2022-02-05 [2] CRAN (R 4.4.0)
KernSmooth 2.23-26 2025-01-01 [3] CRAN (R 4.4.3)
later 1.4.2 2025-04-08 [2] CRAN (R 4.4.3)
lattice 0.22-6 2024-03-20 [3] CRAN (R 4.4.3)
lifecycle 1.0.4 2023-11-07 [2] CRAN (R 4.4.0)
limma * 3.62.2 2025-01-09 [2] Bioconductor 3.20 (R 4.4.2)
lme4 1.1-37 2025-03-26 [1] CRAN (R 4.4.3)
lmerTest 3.1-3 2020-10-23 [1] CRAN (R 4.4.2)
locfit 1.5-9.12 2025-03-05 [2] CRAN (R 4.4.3)
magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.4.0)
MASS 7.3-65 2025-02-28 [3] CRAN (R 4.4.3)
Matrix 1.7-2 2025-01-23 [3] CRAN (R 4.4.3)
matrixStats 1.5.0 2025-01-07 [2] CRAN (R 4.4.2)
memoise 2.0.1 2021-11-26 [2] CRAN (R 4.4.0)
mime 0.13 2025-03-17 [2] CRAN (R 4.4.3)
miniUI 0.1.2 2025-04-17 [2] CRAN (R 4.4.3)
minqa 1.2.8 2024-08-17 [2] CRAN (R 4.4.1)
mvtnorm 1.3-3 2025-01-10 [2] CRAN (R 4.4.2)
nlme 3.1-167 2025-01-27 [3] CRAN (R 4.4.3)
nloptr 2.2.1 2025-03-17 [2] CRAN (R 4.4.3)
numDeriv 2016.8-1.1 2019-06-06 [2] CRAN (R 4.4.0)
pbkrtest 0.5.4 2025-04-28 [2] CRAN (R 4.4.3)
pillar 1.10.2 2025-04-05 [2] CRAN (R 4.4.3)
pkgbuild 1.4.7 2025-03-24 [2] CRAN (R 4.4.3)
pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.4.0)
pkgload 1.4.0 2024-06-28 [2] CRAN (R 4.4.1)
plyr 1.8.9 2023-10-02 [2] CRAN (R 4.4.0)
profvis 0.4.0 2024-09-20 [2] CRAN (R 4.4.1)
promises 1.3.2 2024-11-28 [2] CRAN (R 4.4.2)
purrr 1.0.4 2025-02-05 [2] CRAN (R 4.4.2)
R6 2.6.1 2025-02-15 [2] CRAN (R 4.4.2)
rbibutils 2.3 2024-10-04 [2] CRAN (R 4.4.1)
RColorBrewer 1.1-3 2022-04-03 [2] CRAN (R 4.4.0)
Rcpp 1.0.14 2025-01-12 [2] CRAN (R 4.4.2)
Rdpack 2.6.4 2025-04-09 [2] CRAN (R 4.4.3)
reformulas 0.4.1 2025-04-30 [2] CRAN (R 4.4.3)
remaCor 0.0.18 2024-02-08 [1] CRAN (R 4.4.2)
remotes 2.5.0 2024-03-17 [2] CRAN (R 4.4.0)
reshape2 1.4.4 2020-04-09 [2] CRAN (R 4.4.0)
RhpcBLASctl 0.23-42 2023-02-11 [2] CRAN (R 4.4.0)
rlang 1.1.6 2025-04-11 [2] CRAN (R 4.4.3)
scales 1.4.0 2025-04-24 [2] CRAN (R 4.4.3)
sessioninfo 1.2.3 2025-02-05 [2] CRAN (R 4.4.2)
shiny 1.10.0 2024-12-14 [2] CRAN (R 4.4.2)
statmod 1.5.0 2023-01-06 [2] CRAN (R 4.4.0)
stringi 1.8.7 2025-03-27 [2] CRAN (R 4.4.3)
stringr 1.5.1 2023-11-14 [2] CRAN (R 4.4.0)
testthat * 3.2.3 2025-01-13 [1] CRAN (R 4.4.2)
tibble 3.2.1 2023-03-20 [2] CRAN (R 4.4.0)
tidyr 1.3.1 2024-01-24 [2] CRAN (R 4.4.0)
tidyselect 1.2.1 2024-03-11 [2] CRAN (R 4.4.0)
urlchecker 1.0.1 2021-11-30 [2] CRAN (R 4.4.0)
usethis * 3.1.0 2024-11-26 [2] CRAN (R 4.4.2)
variancePartition * 1.36.3 2025-05-13 [1] Github (DiseaseNeuroGenomics/variancePartition@3996ac7)
vctrs 0.6.5 2023-12-01 [2] CRAN (R 4.4.0)
withr 3.0.2 2024-10-28 [2] CRAN (R 4.4.2)
xtable 1.8-4 2019-04-21 [2] CRAN (R 4.4.0)```
Thank you for any guidance or potential fix.
Hi,
Thank you for the wonderful package its extensive documentation!
I am trying to reproduce the example from the variancePartition documentation page for
voomWithDreamWeights()“Transform RNA-Seq Data Ready for Linear Mixed Modelling with dream()”. Even running the example code exactly as shown results in the following error:Error in .fitVarPartModel(exprObj, formula, data, REML = REML, useWeights = useWeights, : All models failed. The first model fails with: Error in FUN(...): (converted from warning) partial argument match of 'form' to 'formula'Code to reproduce:
All three attempts produce the same error.
Checks and observations
I also tested a formula with only fixed effects:
This runs successfully and returns an object of class EList.
A warning appears:
It works for fixed effects and the error is triggered when including the random effect.
Session Info