Hi,
First of all, thank you for developing this great tool that is mixomics. I have a question about the cimDiablo() function. I am currently working on transcriptomic and metabolomic data, which leads me to perform a Diablo analysis to process this data. My data set is very substantial because I initially work on a large set of variables to try to find very strong links and/or co-regulations. So when I want to generate the heatmap and the dendogram using the cimDiablo function only part of the graph appears and the legend is superimposed on it. My question is therefore the following: what are the possibilities for extracting this graph in an image format without modifying the integrity of the graph and with a legend which appears on one side of the graph? To complete my question, I would like to point out that I tried different methods, notably opening an auxiliary window with the X11() function, but the result is the same. I also tried to “print” the figure directly in PNG by adding the arguments “save = ‘png’” and “name.save = ‘DIABLOcim’” but it returns an error describing a format problem. In desperation I tried to generate an object containing the graph “object<-cimDiablo(dataset)” then create an empty png file and place the graph there using the function “plot(object)” but the function plot is not compatible with the type of object generated… I hope you will have a solution to offer me, thank you in advance for your answers.
hi @tmobarak,
This function (and the DIABLO analysis in general) is not well suited for large datasets, because the method aims to first select variables. So my basic suggestion would be: use the keepX to select variables first A lot of the associations might be spurious if you do not perform variable selection, and DIABLO will be very good at identifying strong associations.
Other options:
- shorten the name of your variables.
- extract from the
cimDiablo()
result themat
matrix. It should be in the same order of what is output. Rerun a heat map with your software of you choice.
## default method: shows cross correlation between 2 data sets
#------------------------------------------------------------------
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")
result = cimDiablo(nutrimouse.sgccda)
result$mat # is the matrix
Kim-Anh