[DIABLO]: cimDiablo - export matrix

Hello,

A similar question is asked by RafaSilva. I am using the DIABLO approach to integrate 2 different omics datasets and came across the cimDiablo function, and have a problem to export the color-coded matrices

My suggestion is that it would be great if those inner-produced correlation matrices could be accessible as an optional output.

Nevertheless, mixOmics package is really a useful package.

Kai

PS: In the meantime, would it be possible to show me how to calculate the matrix using other R function?

Hello @Kai,

We are very glad that mixOmics is helpful in your work!

cimDiablo invisibly returns the correlation matrix and you only need to save it. As an example:

library(mixOmics)
data(nutrimouse)
Y = nutrimouse$diet
data = list(gene = nutrimouse$gene, lipid = nutrimouse$lipid)
design = matrix(c(0,1,1,1,0,1,1,1,0), ncol = 3, nrow = 3, byrow = TRUE)


nutrimouse.sgccda <- block.splsda(X = data,
                                  Y = Y,
                                  design = design,
                                  keepX = list(gene = c(10,10), lipid = c(15,15)),
                                  ncomp = 2,
                                  scheme = "centroid")

par(mar=c(1,1,1,1)) ## adjust the margins for plot so hopefully no RStudio error
## if you got plot.new() error with the following, manually expand your plot area, remove previous plots and run: graphics.off()
cor.mat <- cimDiablo(nutrimouse.sgccda) ## save the output
cor.mat ## the correlation matrix

Let me know if you have further questions.

Hey @aljabadi:
Thanks for your help. Really helpful.
Best wishes
Kai