Different PCoA results?

I had met some problems recently. The PCoA results were different at the different time for the same “Comparison.megan” file. It confused me. I wonder which results was available?
In addition, for the same time the PCoA results were same, eventhough I set different scales, “linear”, “sqrt” or “log” at the taxomony panels.
Could anyone tell me why? Appreciated~

For the same comparison.megan file, why were the PCoA results different at the different times?

One reason could be that the analysis depends on what nodes are selected in the main viewer, different selections will lead to different results. In particular, if you uncollapse or collapse parts of the tree, then effectively, the PCoA analyses will be performed on different ranks.

The different scales only determine how counts are represented in the main tree view, it does not effect how the counts are used in the PCoA analysis.

OK, Thank you~:heart_eyes: I reperformed the pcoa for multiple times, the results were just as you said. And I found that the pcoa result was only related to the first set, such as Rank or uncollapse. So if want to get the different rank PCoA results, I must to reload the input file for many times. :confused::joy:

You can change the collapse state and then select the new leaves (Select->All Leaves menu item)
in the tree viewer and then use the Options->Sync menu item (or Sync toolbar button) of the PCoA viewer to update the PCoA plot, so no need to reload the input file.

1 Like

My problem has been settled perfectly. Thank you ~ :rose:

And I have another question. The PCoA plots were a little different between Rank : species and “Uncollapse whole subtree…”. So I want to know wether are those exported corresponding matrix different? Thank you ~

If you collapse to the specific rank of Species then only the nodes on the rank are selected, while if you collapse the whole tree then some of selected nodes will not be of rank Species

Got it. Thank you again and again ~ :grin:

Hello! I have a question similar to the one answered here, yet I haven’t found it specifically asked across the forum. When MEGAN performs a PCoA on selected nodes, is it using the assigned reads for that node or the summed reads?

I’m performing a PCoA using MEGAN6 (v6.21.9) on a GTDB metagenomic dataset, selecting all nodes with the rank ‘Family’, and specifying the use of a euclidean distance matrix (to best approximate a PCA). I exported the Summed read counts as a csv and wrote an R script using the factoextra package (v1.0.7) to perform a PCA on the exported data. The two plots look remarkably different from each other and I cannot figure out why… My suspicion is that maybe MEGAN is using the counts assigned to the nodes at the Family level to perform the PCA while the counts I exported were summed, but otherwise I’m a bit stumped. Any opinions or guidance towards solving my problem would be greatly appreciated!

MEGAN uses the counts for which ever nodes are selected, however:

If a selected node is collapsed, i.e. its children are not showing, then MEGAN will used the summarized count for that node.
If a selected node is uncollapsed, i.e. its children are showing, then the assigned number is used.
If a selected node has no children (independently of whether they are collapsed or not) then the summarized count will equal the assigned count.

Hopefully that clarifies what is going on.