[DIABLO]: circosPlot - export correlation matrix


I’ve been using the DIABLO approach to integrate 3 different omics datasets and came across the circosPlot function, which is of great value in terms of visualization of paiwise correlations within the 3 data matrices.

My suggestion is that it would be great if those inner-produced correlation matrices could be assessible as an optional output, possibly builted into the circosPlot function as an export argument. This would allow a better intepretation of the results and would complement this plot in terms of interpretation.

Nevertheless, congrats on the development of the mixOmics package.


Hi Rafael,

That sounds like a good idea. We’ll let you know once it’s implemented. In the meantime, you can simply get the pairwise correlation using the cor function from base R stats with appropriate inputs for “method” and “use” arguments . Below I included an example:

## toy omic matrices
omic1=matrix(sample(1:100, 12),ncol = 4,dimnames = list(features= letters[10:12], samples=LETTERS[1:4]))
omic2=matrix(sample(1:100, 20),ncol = 4,dimnames = list(features= letters[13:17], samples=LETTERS[1:4]))
## add a missing value
omic2[2,4] <- NA
## pairwsie correlations b/w omic1 and omic2 features
cor(t(omic1), t(omic2), use = "complete.ob", method = "pearson")

Hope it helps.



Hi @RafaSilva,

Just an update that the correlation matrix can be save as an output of circosPlot. e.g.:

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 <- wrapper.sgccda(X=data,
                                    Y = Y,
                                    design = design,
                                    keepX = list(gene=c(10,10), lipid=c(15,15)),
                                    ncomp = 2,
                                    scheme = "horst")

corMat <- circosPlot(nutrimouse.sgccda, cutoff = 0.7, ncol.legend = 2, size.legend = 1.1)

Please let me know if you have any other questions/suggestions.



Hey AI:
Really appreciate for the update.

I tried to get the correlation using the cor function in R, but I found the result is a bit different from the one directly exported from circosPlot. Could you please check if I did anything wrong? Or correlation from circosPlot is modified based on the pairwise correlation?

corMat1 = cor(nutrimouse$gene, nutrimouse$lipid, use = "complete.ob", method = "pearson")

Thanks in advance for your help.


Hi @Kai,

Thanks for the code and for sharing your experience. We have started a discussion over how similarities are calculated and so far I believe we should re-visit some of these calculations. The similarity measure outputted by circosPlot considers the correlation b/w the variables and the variates which would give different outputs to the ones I mentioned earlier using cor function so my apologies. This is a high priority matter at hand and we’ll update you soon.