Where can i find the PCoA coordinates

Hello, I generate a PCoA plots in QIIME. For example, I got an emperor file -- "unweighted_unifrac_emperor.qzv" and related "unweighted_unifrac_emperor.qza" file.

I would like to find the X, Y, Z coordinates of PCoA plots and regenerate a plot it in R. qzv is a zip file. After I unzip it, I cannot find the raw X, Y, Z data?

Can you tell me where I could find it? Should I check it in qzv or qza file?

Thanks

Hi @sdpapet,
Emperor generates its plot from the data stored in the PCoAResults object you pass into it as an input. In that .qza, you'll find the full results from your principal coordinates analysis in /<UUID>/data/ordination.txt. Using export may make this process more straightforward.

Notably, this data will not be in the form of x, y, z coordinates, but rather the n-samples x n-pricipal-coordinates table of projected values. Columns are ordered l -> r from most to least descriptive of the variance in the system, so IIRC, your 3d plot probably wants the values in the first three columns.

1 Like

Thank you very much. I also did a core analyses. For example, I build a box plots in QIIME to compare group significant.

So, I suppose the raw data was stored in the qza file in this case too, right?

I can think of one good way to find out! :wink:

You can think about the difference between .qzas and .qzvs as being the difference between data objects and visualizations of data. It's possible that a visualization has the data baked into it, but the data object itself should be a reliable source. Whether that data is formatted in the way you want it to be is another question. For example, the .qza might contain raw data, and the .qzv might contain summary statistics about it that you'd have to recalculate yourself if you started from the raw data.

Some visualizations have "click to download" links in them, to give you access to images or summary tables they contain, often in editable formats like .svg or .tsv. Others have options for customization within the vizualization - for example, the ability to manually adjust a viz's Vega spec. It's always worth looking closely - you might get what you need for free. :slight_smile:

2 Likes

Thank you very much.

Just one thing, I am not sure if I understand, when you mentioned "manually adjust a viz's Vega spec".

Is Vega spec a QIIME plugin? Can you paste the link about this plot adjust method?

Thanks,

Nope. Different visualizations use different plotting tools. Vega is a declarative language for visualizing data, and is used in some visualizations.

Different vega-based visualizations may expose these controls differently. In emperor plots, for example, it's this "open in vega editor" button that will give you access:
image

1 Like