cimDiablo plot does not change

Hi,
I recently discovered a problem with the cimDiablo plot, which confuses me.

Whenever I run the following code, the plots seem to visualise the same result, although I change the comp parameter of the cimDiablo function.

X <- list(mRNA = breast.TCGA$data.train$mrna, 
          protein = breast.TCGA$data.train$protein)
Y <- breast.TCGA$data.train$subtype
summary(Y)

MyResult.diablo <- block.splsda(X, Y)

X11()
cimDiablo(MyResult.diablo, 
          comp = 1, margin=c(8,20), legend.position = "right")

X11()
cimDiablo(MyResult.diablo, 
          comp = 2, margin=c(8,20), legend.position = "right")

If I do the same, just that I use the keepX parameter for the analysis, the plots are different when changing the comp parameter.

X <- list(mRNA = breast.TCGA$data.train$mrna, 
          protein = breast.TCGA$data.train$protein)
Y <- breast.TCGA$data.train$subtype
summary(Y)

list.keepX <- list(mRNA = c(16, 17), protein = c(5, 5))

MyResult.diablo <- block.splsda(X, Y, keepX = list.keepX)

X11()
cimDiablo(MyResult.diablo, 
          comp = 1, margin=c(8,20), legend.position = "right")
X11()
cimDiablo(MyResult.diablo, 
          comp = 2, margin=c(8,20), legend.position = "right")

Can someone maybe explain to me why the keepX parameter of the analysis impacts the cimDiablo plot? Shouldn’t the changing of the comp also work when using the whole dataset and not only a part of the variables?

I really appreciate any help you can provide.

Good spot! Thanks @kathi_munk. I’ll look into this and try get a fix out to you as soon as possible!

While it may seem like there’s an error occurring, this is actually functioning properly. cimDiablo() is not displaying the component values of each sample, but the raw values of each sample. Hence, when there was no feature selection (lack of keepX), changing the ncomp actually doesn’t change anything about the output, as all features are selected on all components.

When we introduce feature selection (presence of keepX), the features which are used for each ncomp are different. Then, by adjusting the ncomp parameter in cimDiablo(), you are effectively adjusting which features’ raw values are being displayed.

Hope this belated response helps you out @kathi_munk and anyone else who notices the same thing in the future!