I am currently using DIABLO algorithm to integrate 4 -omics in order to extract a biomarker in the context of auto-immune diseases. My sample size is 51 with 27 samples belonging to a class and 24 to the other. I run the block.splsda using only 1 component but I get the following error:
Error in colnames<-(*tmp*, value = (names(crit) = paste0(“fold”, 1:M))) :
attempt to set ‘colnames’ on an object with less than two dimensions
I do not get it when I increase the number of components to 2. What is the explanation for this?
does that mean that it is not possible to evaluate the performance of a model on 1 component?
Also, when I run the model with 2 components, the perf function does not fill up the “average.predict.class” slot -it gives me an empty list- but I have bestParameters$perf$AveragedPredict.error.rate filled with values…
I use to run it without any issue untill maybe a couple of weeks ago…
I am sorry I realized I had an issue with the reprex package.
Here is the right format. Thank you for your patience.
## loading mixOmics package
#> Loading required package: MASS
#> Loading required package: lattice
#> Loading required package: ggplot2
#> Loaded mixOmics 6.15.0
#> Thank you for using mixOmics!
#> Tutorials: http://mixomics.org
#> Bookdown vignette: https://mixomicsteam.github.io/Bookdown
#> Questions, issues: Follow the prompts at http://mixomics.org/contact-us
#> Cite us: citation('mixOmics')
# this is the X data as a list of mRNA, miRNA and proteins
data = list(mrna = breast.TCGA$data.train$mrna, mirna = breast.TCGA$data.train$mirna,
protein = breast.TCGA$data.train$protein)
# set up a full design where every block is connected
design = matrix(1, ncol = length(data), nrow = length(data),
dimnames = list(names(data), names(data)))
diag(design) = 0
#> mrna mirna protein
#> mrna 0 1 1
#> mirna 1 0 1
#> protein 1 1 0
# set number of variables to select
list.keepX = list(mrna =20, mirna =2, protein = 10)
TCGA.block.splsda = block.splsda(X = data, Y = breast.TCGA$data.train$subtype,
ncomp = 1, keepX = list.keepX, design = design)
#> Design matrix has changed to include Y; each block will be
#> linked to Y.
## with perf function is where I get the error
#> Error in `colnames<-`(`*tmp*`, value = (names(crit) = paste0("fold", 1:M))): attempt to set 'colnames' on an object with less than two dimensions