I have several problems using the omicsCompAnalysis of STATegRa:
When computing the common components with selectCommonComps
, the common values are 0. One reason might be that when plotting the ssq the XY or YX component is usually much higher than the variance of X and Y. Looking at the pratios plot, for the first component the SSQ ratios between each block and estimator for one block is close to 6 while the other is near 0. In the next commponents the ratio for each block is similar but close to 0. However when using PCA.selection, I get 7 commononents at least.
>PCA.selection(data1, fac.sel = "single%", varthreshold = 0.03)$numComps
## [1] 7
>PCA.selection(data2, fac.sel = "single%", varthreshold = 0.03)$numComps
## [1] 8
Using modelSelection
agrees with the two previous functions:
> modelSelection(list(ES1, ES2), Rmax = 7, fac.sel = "single%",
+ varthreshold = 0.03)
$common
[1] 0
$dist
[1] 7 8
When using the function (with 2 common component analysis) in DISCOSCA method I get an error:
> oCA <- omicsCompAnalysis(list(ES1, ES2),
+ Names = c("Intestinal", "Stools"),
+ method = "DISCOSCA",
+ Rcommon = 2,
+ Rspecific = 2)
[1] "The following features are eliminated because are constant: 6 \n OTU_1998, OTU_3076, OTU_437, OTU_499, OTU_68, OTU_75"
[1] "The following features are eliminated because are constant: 2 \n OTU_422, OTU_99"
Error in matrix(1, nrow = nrow(block1), ncol = d2) :
invalid 'ncol' value (too large or NA)
The ES1 and ES2 object where created using createOmicsExpressionSet
with the same data as in data1 and data2.
When I tried to do the analysis with the same data omicsCompAnalysis(list(ES1, ES1), ...
I got the same error:
Error in matrix(1, nrow = nrow(block1), ncol = d2) :
invalid 'ncol' value (too large or NA)
>traceback()
7: matrix(1, nrow = nrow(block1), ncol = d2)
6: cbind(matrix(0, nrow = nrow(block1), ncol = d1), matrix(1, nrow = nrow(block1),
ncol = d2), matrix(0, nrow = nrow(block1), ncol = R - d1 -
d2))
5: rbind(cbind(matrix(0, nrow = nrow(block1), ncol = d1), matrix(1,
nrow = nrow(block1), ncol = d2), matrix(0, nrow = nrow(block1),
ncol = R - d1 - d2)), cbind(matrix(1, nrow = nrow(block2),
ncol = d1), matrix(0, nrow = nrow(block2), ncol = d2), matrix(0,
nrow = nrow(block2), ncol = R - d1 - d2)))
4: DISCO_SCA(d1 = Rspecific[1], d2 = Rspecific[2], common = Rcommon,
block1 = Data[[1]], block2 = Data[[2]], maxiter = maxIter,
convergence = convThres)
3: DISCO_SCA(d1 = Rspecific[1], d2 = Rspecific[2], common = Rcommon,
block1 = Data[[1]], block2 = Data[[2]], maxiter = maxIter,
convergence = convThres)
2: omicsCompAnalysis(list(ES1, ES2), Names = c("Intestinal",
"Stools"), method = "DISCOSCA", Rcommon = cc$common, Rspecific = 2)
1: omicsCompAnalysis(list(ES1, ES2), Names = c("Intestinal",
"Stools"), method = "DISCOSCA", Rcommon = cc$common, Rspecific = 2)
Is this error telling me there isn't a common component? How can I use DISCOSA?
PS: It seems that instead of using message
it uses print
to notify the users.
R version 3.4.2 (2017-09-28)
Platform: i686-pc-linux-gnu (32-bit)
Running under: Ubuntu 16.04.3 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=es_ES.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=es_ES.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=es_ES.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] Biobase_2.38.0 BiocGenerics_0.24.0 STATegRa_1.12.0 RGCCA_2.1.2 ggplot2_2.2.1
loaded via a namespace (and not attached):
[1] codetools_0.2-15 preprocessCore_1.40.0 digest_0.6.12 scales_0.5.0 grid_3.4.2 bitops_1.0-6 gdata_2.18.0
[8] zlibbioc_1.24.0 munsell_0.4.3 compiler_3.4.2 tibble_1.3.4 affy_1.56.0 lattice_0.20-35 labeling_0.3
[15] foreach_1.4.3 iterators_1.0.8 KernSmooth_2.23-15 MASS_7.3-47 BiocInstaller_1.28.0 plyr_1.8.4 gplots_3.0.1
[22] caTools_1.17.1 gtable_0.2.0 rlang_0.1.4 edgeR_3.20.1 colorspace_1.3-2 calibrate_1.7.2 tools_3.4.2
[29] affyio_1.48.0 locfit_1.5-9.1 gridExtra_2.3 limma_3.34.0 lazyeval_0.2.1 gtools_3.5.0 Rcpp_0.12.13