# Pcoa. phylip-formatted distance matrix

**URL:** <https://help.galaxyproject.org/t/pcoa-phylip-formatted-distance-matrix/15717>\
**Category:** Uncategorized\
**Tags:** metagenomics, tool-help, mothur\_dist\_shared, mothur\_pcoa\
**Created:** [June 12, 2025, 2:35pm UTC](https://help.galaxyproject.org/t/pcoa-phylip-formatted-distance-matrix/15717 "2025-06-12T14:35:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tahmine\_Aldaghi](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/tahmine_aldaghi/32/7301_2.png) [@Tahmine\_Aldaghi](https://help.galaxyproject.org/u/Tahmine_Aldaghi)\
**Post date:** [June 12, 2025, 2:35pm UTC](https://help.galaxyproject.org/t/pcoa-phylip-formatted-distance-matrix/15717/1 "2025-06-12T14:35:16Z")

</div>

How can I make a phylip-formatted distance matrix? I need it for beta diversity analysis

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [June 13, 2025, 11:25pm UTC](https://help.galaxyproject.org/t/pcoa-phylip-formatted-distance-matrix/15717/2 "2025-06-13T23:25:33Z")

</div>

Hi @Tahmine_Aldaghi

For the Mothur tool **Pcoa** Principal Coordinate Analysis for a distance matrix ([link at EU](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/iuc/mothur_pcoa/mothur_pcoa/1.39.5.0)), you can create the file with the **Dist.shared** Generate a phylip-formatted dissimilarity distance matrix among multiple groups tool ([link at EU](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/iuc/mothur_dist_shared/mothur_dist_shared/1.39.5.0)).

How to learn the expected into formats for tools is under _accepted formats_ toggle near the the input area to the tool. The Mothur tools “usually” have an output format that is based on the upstream tool that generates it, so reviewing that common naming between tools is one place to start.

 ![Screen Shot 2025-06-13 at 4.02.58 PM](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/b/b0976c88a7d19ff366475eb50010f6a7e336c185.png)

All the upstream tools and steps are in our tutorial here. → [Hands-on: 16S Microbial Analysis with mothur (extended) / 16S Microbial Analysis with mothur (extended) / Microbiome](https://training.galaxyproject.org/training-material/topics/microbiome/tutorials/mothur-miseq-sop/tutorial.html#beta-diversity) (see #beta-diversity).

Hope this helps! 🙂

---

<div class="post-metadata">

**Author:** ![Tahmine\_Aldaghi](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/tahmine_aldaghi/32/7301_2.png) [@Tahmine\_Aldaghi](https://help.galaxyproject.org/u/Tahmine_Aldaghi)\
**Post date:** [June 17, 2025, 1:52pm UTC](https://help.galaxyproject.org/t/pcoa-phylip-formatted-distance-matrix/15717/3 "2025-06-17T13:52:53Z")

</div>

Dear,  
Thanks. But for using the **Dist. shared,** the file should be in the format **mothur.shared**. How can I change the format of my file to this format, and how can I understand the requirements and structure of each format?  
Thanks

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [July 23, 2025, 6:58pm UTC](https://help.galaxyproject.org/t/pcoa-phylip-formatted-distance-matrix/15717/4 "2025-07-23T18:58:13Z")

</div>

Hi @Tahmine_Aldaghi

> [@Tahmine\_Aldaghi](#):
>
> But for using the **Dist. shared,** the file should be in the format **mothur.shared**. How can I change the format of my file to this format

All **mothur.shared** files are a type of indexed data file. This is where the OTU clusters are defined – the cluster label, how many sequences, what that representative sequence is, and some statistics.

First, you’ll have an original shared file with everything, then you’ll filter it for significance to create the version used with the other downstream tools.

The example in this protocol is in the tutorial I linked. If you browser keyword search that page with “make.shared”, you’ll see where the original file was created, then all the other tools that use it.

> [@jennaj](#):
>
> All the upstream tools and steps are in our tutorial here. → [Hands-on: 16S Microbial Analysis with mothur (extended) / 16S Microbial Analysis with mothur (extended) / Microbiome](https://training.galaxyproject.org/training-material/topics/microbiome/tutorials/mothur-miseq-sop/tutorial.html#beta-diversity) (see #beta-diversity).

Then for this part:

> [@Tahmine\_Aldaghi](#):
>
> how can I understand the requirements and structure of each format?

You can do two primary things to learn how a tool works.

1. **Review the original Mothur guides**. Find these linked in the Help of the tool form or just browser search the suite name or tool name.

2. **Review any tutorials that include the tool.** These might be from the original author or at other public scientific forums (same as above), or the tool might be included in a Galaxy tutorial (check the bottom of tool forms).

* * *

* * *

I have an example here if you want to import to review the files. The last dataset is extra – I converted the **mothur.shared** file to a tabular format to make it easier to see the content.

> [@MOTHUR filter.seqs help](https://help.galaxyproject.org/t/mothur-filter-seqs-help/15395/2):
>
> - [https://usegalaxy.org/u/jen-galaxyproject/h/training-16s-rrna-sequencing-with-mothur-main-tutorial-5](https://usegalaxy.org/u/jen-galaxyproject/h/training-16s-rrna-sequencing-with-mothur-main-tutorial-5)

* * *

Overall – what to do depends on what your data looks like now. There might be other tools and manipulations you can apply. Hope this helps and let us know how this goes! 🙂
