Error while tuning parameters for DIABLO

Hello team,

I am trying to apply DIABLO method (mixOmics: 6.12.2 version) for integrating mRNA, protein and phospho-protein expression across the 12 samples with four outcome subgroups. I could successfully identify variables using Tuning KeepX and apply the method previously with two subgroups. However, with new model (4 subgroups outcome), I am prompted with the following error:

Error in dimnames(x) <- dn :
length of ‘dimnames’ [2] not equal to array extent

Here’s my code for tuning parameters:

Input files

rna <- read.csv(“RNA_SENSITIVE_mixomics.csv”)
ptn <- read.csv(“SENSITIVE_PTN_mixomics.csv”)
p_ptn <- read.csv(“sens_phospho_mixomics.csv”)
names <- scan(“sens_samples.txt”, “”)
rownames(rna) <- names
rownames(ptn) <- names
rownames(p_ptn) <-names
rna[] <- 1
ptn[] <- 1
p_ptn[] <- 1
X <- list(mRNA=rna,Ptn=ptn,P_ptn=p_ptn)
y <- scan(“sens_phenotype.txt”, “”)
Y <- factor(y)

tuning parameters

data <- X
design = matrix(0.1, ncol = length(data), nrow = length(data), dimnames = list(names(data), names(data)))
diag(design) = 0
test.keepX = list (mRNA = c(5:9, seq(10, 18, 2), seq(20,30,5)), Ptn = c(5:9, seq(10, 18, 2), seq(20,30,5)), P_ptn= c(5:9, seq(10, 18, 2), seq(20,30,5)))
tune.para = tune.block.splsda(X = data, Y = Y, ncomp = 3, test.keepX = test.keepX, design = design, validation = ‘Mfold’, folds = 3, nrepeat = 2, cpus = 1, dist = “centroids.dist”)

The dimensions of my data:

lapply(X, dim)
[1] 12 14810
[1] 12 6962
[1] 12 3085

Could you please suggest me where I am going wrong? I am facing the same error on using 24 samples with four outcome subgroups. When I give an arbitrary number of features to be selected from the components, the method does work giving me results and plots.

Thanks a lot in advance!

hi @shanthi011

I am pinging @aljabadi here but we are both on a break until 04/01.
It seems your input arguments are correct, as long as all four groups are represented in Y (i.e. not a subgroup missing). If the error is coming from the tuning, it could be that during cross-validation, one class is completely missing in one training fold. I stronglyy advice you do validation = ‘leave-one-out’ (no need for repeat in that case) given that you only have 12 samples.


Hello @kimanh.lecao

Thank you very much for your prompt reply!
I will follow your advice on cross-validation and check.

Happy holidays!

Hi @kimanh.lecao and @aljabadi,

After changing the validation methods to “loo”, I am still facing the same error. This time I got the error after >5 hours of the run. Could you please suggest any alternative?

Thank you for your help!

Hi @shanthi011,

Please always update to the latest release version first to see if your issue is resolved. The current release is 6.14.0. See Bioconductor - mixOmics

If you still face the issue, can you please

  1. ensure you do not have missing values in the new Y vector
  2. update to the latest using BiocManager::install('aljabadi/mixOmics') and see if the problem persists.

I’d appreciate if you could let us know if the problem is resolved.