Diablo Legend not matching groups

Hi, thanks for the great support.
I have a (hopefully) simple issue with plotting plotVar(), since the legend does not match the blocks (please see image). I hope that the plotIndiv, or even the plotDiablo gives me the right graphs. I am analysing three blocks or microRNA, RNA and proteins to distinguish two groups. From one can see that the names of the microRNAs appear as they should, but on the legend they are marked as “Prot”, while the blue dots should be RNA and not microRNA in the legend, and the grey dots should be Prot. The analysis that follows seems to be fine, also other plots such as cluster analysis.

RCC<-list(RNA=RNA,microRNA=microRNA,Prot=Prot)
Y<-as.factor(patients$Group)
RCC.res ← block.splsda(RCC, Y)
plotVar(RCC.res, var.names = c(FALSE, TRUE, FALSE),legend=TRUE, pch=c(16,16,16))

Hi @Andreas,

Thanks for posting your issue. Can you please install the latest devel version & see if the issue is fixed? It was fine on my system.

BiocManager::install('mixOmicsTeam/mixOmics@devel')

If you believe the problem persists, can you please use a reproducible mixOmics example & explain why you think the blocks are not correctly matched?

Best,

Al

Hi Al, thank you so much for you great support. I have installed the latest devel version, but the problem persists.
I have used the data.breast.TCGA as example:
data(breast.TCGA)

X ← list(mRNA = breast.TCGA$data.train$mrna,
miRNA = breast.TCGA$data.train$mirna,
protein = breast.TCGA$data.train$protein)
Y ← breast.TCGA$data.train$subtype
MyResult.diablo2 ← block.plsda(X, Y)
plotVar(MyResult.diablo2, var.names = c(FALSE, TRUE, FALSE),
col=c(‘darkorchid’, ‘lightgreen’,‘brown1’),legend=TRUE, pch=c(16,16,1))

As you will see, the colours in the Legend are correct, and for block “protein”, all looks good. However, inserting the names for second block, which is microRNA, shows that in the legend the colour for microRNA is coprrect, but the “mRNA” is listed instead. I have the suspicion that the actual names in the legend are listed alphabetically. In my own example, that was the same situation:in the legend the names of the blocks were rather in alphabetical order, not in the order used to create the matrix

out of the three datasets.