# required file for PCOA

**URL:** <https://forum.qiime2.org/t/required-file-for-pcoa/19172>\
**Category:** Technical Support\
**Created:** [April 11, 2021, 11:30am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172 "2021-04-11T11:30:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)\
**Post date:** [April 11, 2021, 11:30am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/1 "2021-04-11T11:30:10Z")

</div>

hello everyone,  
my colleague asked me to create a PCoA plot and I know that I need a distance matrix artifact based on plugin details [here](https://docs.qiime2.org/2021.2/plugins/available/diversity/pcoa/).  
I did alpha and beta diversity already. we need to compare the distances between our samples. sorry if my question is simple but can you let me know which of the files is more appropriate for this kind of analysis? I mean weighted or unweighted Unifrac? or something else?  
thank you

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 11, 2021, 12:56pm UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/2 "2021-04-11T12:56:30Z")

</div>

Hello Mohsen,

> [@mohsen\_ej](#):
>
> sorry if my question is simple but can you let me know which of the files is more appropriate for this kind of analysis? I mean weighted or unweighted Unifrac? or something else?

There's lots of ways to measure beta diversity because they all measure different things. There's a detailed overview of different diversity metrics in [this post](https://forum.qiime2.org/t/alpha-and-beta-diversity-explanations-and-commands/2282).

I often use Jaccard and UniFrac distances as they answer my biological questions, but depending _how_ you want to compare your samples, you could choose another distance.

> [@mohsen\_ej](#):
>
> my colleague asked me to create a PCoA plot

What is the biological question you and your colleagues are asking?

Colin

---

<div class="post-metadata">

**Author:** ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)\
**Post date:** [April 12, 2021, 9:55am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/3 "2021-04-12T09:55:50Z")

</div>

thank you for your answer @colinbrislawn we're trying to determine the bacterial community of 3 different types of meat and also try to find maybe a pathogen so we need to know similarity of the groups first. which of them would be better?

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 13, 2021, 3:44pm UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/4 "2021-04-13T15:44:45Z")

</div>

> [@mohsen\_ej](#):
>
> we’re trying to determine the bacterial community of 3 different types of meat and also try to find maybe a pathogen

This sounds like a cool study! 🥩

> [@mohsen\_ej](#):
>
> which of them would be better?

The different beta diversity measure are better in different ways... There no "Right Answer" of how to compare your samples.

I like to start with Jaccard and Weighted UniFrac distances.

Jaccard measure the percentage of taxa not found in both samples. So if 70% of taxa are only found in one sample, and the Jaccard distance is 0.70!

UniFrac distances are just like Jaccard, except they measure the percentage of _phylogenetic branch length_ not found in both samples. This adjustment for phylogeny can be very informative. 🌴

---

<div class="post-metadata">

**Author:** ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)\
**Post date:** [April 14, 2021, 11:17am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/5 "2021-04-14T11:17:39Z")

</div>

thank you for your good information.  
so, you mean if I run the PCOA, it will give some numerical results as well? or you mean I can get the results based on Jaccard for example separately?  
another thing is that I run the pcoa but the result is not a qzv file. how can I convert it from qza to qzv file?  
thank you again

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 14, 2021, 1:28pm UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/6 "2021-04-14T13:28:12Z")

</div>

Thank you!

> [@mohsen\_ej](#):
>
> so, you mean if I run the PCOA, it will give some numerical results as well? or you mean I can get the results based on Jaccard for example separately?

The diversity analysis is part of a pipeline that gives you multiple numerical results, starting with a distance liks Jaccard or UniFrac, and later PCoA results.

You might have found this already, but you could review the [full diversity pipeline](https://docs.qiime2.org/2021.2/tutorials/overview/#diversity-analysis) on this flow chart:  
[![](https://docs.qiime2.org/2021.2/_images/diversity.png) ](https://docs.qiime2.org/2021.2/_images/diversity.png)

The DistanceMatrix will contain the Jaccard distances between your samples.  
Later on, you can also get the numerical PCoA result before graphing it using Emperor.

> [@mohsen\_ej](#):
>
> another thing is that I run the pcoa but the result is not a qzv file. how can I convert it from qza to qzv file?

Take a look at the [beta diversity example in the PD-Mouse tutorial](https://docs.qiime2.org/2021.2/tutorials/pd-mice/#diversity-analysis). You can get results in either .qzv or .qza files to for different steps in this pipeline.

I hope this is helpful. There is a lot of ways to approach beta diversity and the pipeline has lots of steps,  
so take a look at the tutorials and let us know if you have questions about the details!

Colin 🐋

---

<div class="post-metadata">

**Author:** ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)\
**Post date:** [April 16, 2021, 2:26am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/7 "2021-04-16T02:26:46Z")

</div>

Yes, I read these already but thank you for your mention.  
actually, my question was that when we run the beta diversity as you mentioned in the PD mice tutorial the results are PCOA files or I should run commands for that, because some of them contain PCOA in their names like Jaccard and weighted Unifrac for example. I need to know are these results the files we were looking for? or should run again something. and about the files which don't have PCOA in their name, we should run the PCOA command probably. am I right?  
sorry if my question is simple for you 😅 I just need to be sure about the procedure.  
Thank you

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 16, 2021, 2:46am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/8 "2021-04-16T02:46:17Z")

</div>

Ok cool! I'm glad you found the tutorials and got these commands working for you. Good examples reduce confusion.

In the PD-mouse tutorial (and other places too!), these files contain the distances between samples in a matrix:  
`core-metrics-results/jaccard_distance_matrix.qza` : [view](https://view.qiime2.org/?src=https%3A%2F%2Fdocs.qiime2.org%2F2021.2%2Fdata%2Ftutorials%2Fpd-mice%2Fcore-metrics-results%2Fjaccard_distance_matrix.qza) | [download](https://docs.qiime2.org/2021.2/data/tutorials/pd-mice/core-metrics-results/jaccard_distance_matrix.qza)  
`core-metrics-results/weighted_unifrac_distance_matrix.qza`: [view](https://view.qiime2.org/?src=https%3A%2F%2Fdocs.qiime2.org%2F2021.2%2Fdata%2Ftutorials%2Fpd-mice%2Fcore-metrics-results%2Fweighted_unifrac_distance_matrix.qza) | [download](https://docs.qiime2.org/2021.2/data/tutorials/pd-mice/core-metrics-results/weighted_unifrac_distance_matrix.qza)

And these files contain the PCoA ordination of that distance matrix:  
`core-metrics-results/jaccard_pcoa_results.qza` : [view](https://view.qiime2.org/?src=https%3A%2F%2Fdocs.qiime2.org%2F2021.2%2Fdata%2Ftutorials%2Fpd-mice%2Fcore-metrics-results%2Fjaccard_pcoa_results.qza) | [download](https://docs.qiime2.org/2021.2/data/tutorials/pd-mice/core-metrics-results/jaccard_pcoa_results.qza)  
`core-metrics-results/weighted_unifrac_pcoa_results.qza`: [view](https://view.qiime2.org/?src=https%3A%2F%2Fdocs.qiime2.org%2F2021.2%2Fdata%2Ftutorials%2Fpd-mice%2Fcore-metrics-results%2Fweighted_unifrac_pcoa_results.qza) | [download](https://docs.qiime2.org/2021.2/data/tutorials/pd-mice/core-metrics-results/weighted_unifrac_pcoa_results.qza)

And finally, these files contain

- the distances between samples
- after PCoA ordination
- plotted using using Emperor to make a nice visualization!

`core-metrics-results/jaccard_emperor.qzv`: [view](https://view.qiime2.org/?src=https%3A%2F%2Fdocs.qiime2.org%2F2021.2%2Fdata%2Ftutorials%2Fpd-mice%2Fcore-metrics-results%2Fjaccard_emperor.qzv) | [download](https://docs.qiime2.org/2021.2/data/tutorials/pd-mice/core-metrics-results/jaccard_emperor.qzv)  
`core-metrics-results/weighted_unifrac_emperor.qzv`: [view](https://view.qiime2.org/?src=https%3A%2F%2Fdocs.qiime2.org%2F2021.2%2Fdata%2Ftutorials%2Fpd-mice%2Fcore-metrics-results%2Fweighted_unifrac_emperor.qzv) | [download](https://docs.qiime2.org/2021.2/data/tutorials/pd-mice/core-metrics-results/weighted_unifrac_emperor.qzv)

> my colleague asked me to create a PCoA plot

Those `*_emperor.qzv` files contain PCoA plots!

Colin

---

<div class="post-metadata">

**Author:** ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)\
**Post date:** [April 16, 2021, 2:53am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/9 "2021-04-16T02:53:31Z")

</div>

thank you very much,  
I thought I should convert jaccard\_pcoa\_results.qza to a qzv file.  
so, you mean after we run the beta diversity commands we get the pcoa results automatically, right?  
I mean the emperor files are the pcoa visualization files?

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 16, 2021, 3:25am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/10 "2021-04-16T03:25:45Z")

</div>

> [@mohsen\_ej](#):
>
> I thought I should convert jaccard\_pcoa\_results.qza to a qzv file.

Yeah, I guess the way you would convert data (.qza) into a visualization (.qzv) would be to use a program like Emperor to make a graph of your data.

> [@mohsen\_ej](#):
>
> I mean the emperor files are the pcoa visualization files?

That's right!

.qza files are Qiime2 zipped artifacts. They include data and provenance.  
.qzv files are Qiime2 zipped visualizations. They include data, provenance, and a visualization 📊!

> [@mohsen\_ej](#):
>
> you mean after we run the beta diversity commands we get the pcoa results automatically, right?

Yes, you get the PCoA results AND a graph of the PCoA results!

That's the magic of a good Qiime2 pipeline! :qiime2: ✨ 📊

---

<div class="post-metadata">

**Author:** ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)\
**Post date:** [April 16, 2021, 3:41am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/11 "2021-04-16T03:41:06Z")

</div>

I appreciate your help and answering patiently.  
thank you very much

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [May 17, 2021, 9:41am UTC](https://forum.qiime2.org/t/required-file-for-pcoa/19172/12 "2021-05-17T09:41:40Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
