PCA miscolored and groups mislabed

Hello developers,

I have an issue with PCA grafics.

These are the steps I follow.

Statistical Analysis [one factor]

  1. Upload the data: peak intensities, samples in rows (unpaired). The data is a csv file (attached).
  2. Missing values: STEP 1: remove with > 65% mvs. STEP 2: KNN(feature-wise).
  3. Filtering features: RSDs > 30%. Percentage to filter out: 0 %
  4. Normalization: none. Data transformation: log. Data scaling: autoscaling.
  5. PCA analysis > 2D Scores Plot: Look that QCs are the blue circles and the Severe group are the light green circles.
  6. Go to Data Editor > Edit Groups: remove the QC group.
  7. Apply the same normalization, transformation and scaling as did above (step 4).
  8. PCA analysis (in fact, no matters what analysis is selected in this step, should be PLS-DA also).
  9. Go back to Data Editor > Edit Groups: include the QC group.
  10. Same settings for normalization, transformation and scaling.
  11. PCA analysis > 2D Scores Plot: Look at QC and Severe groups. QC and Severe groups were interchanged. The blue circles correspond to samples of the severe group.

I add some screenshots:

PCA (step 5)

PCA (step 11)

As you can see, labels and colors were interchanged.

Thanks for the help.

Here the data: Input_MetabAnaly_E3.csv (188.1 KB)

Hi, I am not an expert user but I am having a similar problem.
It happens with the greyscale PCA plots as well, where samples are mislabelled.
Any advice?

Hello, Rosa!

I do not know if the problem was corrected after the recent actualization of MetaboAnalyst (2023-06-23). I report that bug before that date.

To avoid this problem, I realized that the order - in edit group tab - must be the same as the original set. That is, when the group is included again, it must be in the same order before it was excluded.

Original order:

  1. Group A
  2. Group B
  3. QC group
  4. Group C

Order after excluding a group:

  1. Group A
  2. Group B
  3. Group C

Order after incluiding the group again: (The error is not observed)

  1. Group A
  2. Group B
  3. QC group
  4. Group C

Order after incluiding the group again: (The error is observed)

  1. Group A
  2. Group B
  3. Group C
  4. QC group

I hope it has been helpful.

Indeed, this is the solution. MetaboAnalyst uses the Data Editor to allow users to update group orders (default is alphabetic order).

Now I make this as an explicit option (see below). If you would like to use the same color schema as before (i.e. alphabetic order), simple uncheck the checkbox shown at the bottom.

This topic was automatically closed after 8 days. New replies are no longer allowed.