Unless I'm missing something, there seems to be a bug in the variance stabilization function vsn2 or the predict method for the vsn object when calib="none". Below is a self-contained example with random data. Thanks!
>#Simulate data >library(vsn); > nGenes = 1000; > nSamples = 100; > data = exp(matrix(rnorm(nGenes * nSamples), nGenes, nSamples) + log(1:nGenes)); ### Run vsn2 with default arguments: no problems > fit = vsn2(data) vsn2: 1000 x 100 matrix (1 stratum). Please use 'meanSdPlot' to verify the fit. > vsdata = predict(fit, newdata = data); ### Run vsn2 without calibration > fit2 = vsn2(data, calib = "none") vsn2: 1000 x 100 matrix (1 stratum). Please use 'meanSdPlot' to verify the fit. > vsdata2 = predict(fit2, newdata = data); Error in vsn2trsf(newdata, object@coefficients, strata, hoffset = if (log2scale) object@hoffset else NULL) : 'p' has wrong dimensions.
> sessionInfo() R version 3.3.1 Patched (2016-07-30 r71015) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Fedora 24 (Twenty Four) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] 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 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] vsn_3.42.3 Biobase_2.32.0 BiocGenerics_0.18.0 loaded via a namespace (and not attached): [1] Rcpp_0.12.6 lattice_0.20-33 grid_3.3.1 [4] plyr_1.8.4 gtable_0.2.0 affy_1.50.0 [7] scales_0.4.0 ggplot2_2.1.0 BiocInstaller_1.22.3 [10] zlibbioc_1.18.0 affyio_1.42.0 limma_3.28.17 [13] preprocessCore_1.34.0 munsell_0.4.3 colorspace_1.2-6
Thanks - I will report whatever nuggets of wisdom I can find...