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[is.na(rna)] ← 1
ptn[is.na(ptn)] ← 1
p_ptn[is.na(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
design
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)
$mRNA
[1] 12 14810
$Ptn
[1] 12 6962
$P_ptn
[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!