Matching sample names with annotations in group PCA function

Hello I’ve seen this question asked for more complicated settings across the Forum but I haven’t seen a satisfactory answer yet. Apologies if I missed it. In plotIndiv, we are supposed to match sample names of the dataframe with annotations given by the group = annotation$(Class) but in my case, it does not match at all. I had to take care that my samples be in the same order in the dataframe and in the annotation file, ie mixOmics is unable to assign the correct samples to the annotation just by itself. Am I doing something wrong? (There is no special char in my sample names or annnotations and I’m using the latest mixOmics version 6.16.3 in RStudio (R.4.1.1) Ubuntu 20.04. Many thanks

hi @gilles ,

This is correct, you have to do it by hand, we dont reorganise the rows ourselves inside our methods functions (this will come maybe in a major update if we move to multiAssayExperiment class!)

Kim-Anh

Hi @gilles,

Do you refer to the order of annotations or a mismatch between the actual sample group and the group shown in the legend? If the latter, can you please provide a reproducible example with walk-through?

Best,
Al