# Error when generating PCoA plot

**URL:** https://forum.qiime2.org/t/error-when-generating-pcoa-plot/7780
**Category:** User Support
**Tags:** emperor
**Created:** [January 11, 2019, 12:16am UTC](https://forum.qiime2.org/t/error-when-generating-pcoa-plot/7780 "2019-01-11T00:16:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jia](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@Jia](https://forum.qiime2.org/u/Jia)
#### Post date: [January 11, 2019, 12:16am UTC](https://forum.qiime2.org/t/error-when-generating-pcoa-plot/7780/1 "2019-01-11T00:16:03Z")

</div>

Hi,

I filtered my distance matrix based on Metadata. Then I wanted to generate PCoA with the filtered distance matrix, but I got an error. Could you please help me to figure it out? Here are the codes I used and the error message.

qiime diversity filter-distance-matrix   
--i-distance-matrix core-metrics-results/unweighted\_unifrac\_distance\_matrix.qza   
--m-metadata-file MetaData\_CaneToadData1.tsv   
--p-where "SampleTypes='large\_intestine'"   
--o-filtered-distance-matrix core-metrics-results/large\_intestine-filtered-distance-matrix.qza

qiime emperor plot   
--i-pcoa core-metrics-results/large\_intestine-filtered-distance-matrix.qza   
--m-metadata-file MetaData\_CaneToadData1.tsv   
--p-custom-axes Location   
--o-visualization core-metrics-results/PCOA\_large\_intestine-filtered\_unweighted-unifrac-Location.qzv

**(qiime2-2018.11) JiadeMacBook-Pro:QIIME2 jiazhou$ less /var/folders/v9/gy5c6y6j3b9cz3f2ccj5lj0m0000gn/T/qiime2-q2cli-err-f97vxur1.log**

**_Traceback (most recent call last):_**  
**\_ File "/Users/jiazhou/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/q2cli/commands.py", line 274, in call\_**  
\*\*\_ results = action(**arguments)\_**  
**\_ File "", line 2, in plot\_**  
**\_ File "/Users/jiazhou/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/sdk/action.py", line 199, in bound\_callable\_**  
\*\*\_ self.signature.check\_types(**user\_input)\_**  
**\_ File "/Users/jiazhou/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/core/type/signature.py", line 301, in check\_types\_**  
**\_ name, kwargs[name].type, spec.qiime\_type))\_**  
**_TypeError: Parameter 'pcoa' received an argument of type DistanceMatrix. An argument of subtype PCoAResults is required._**

Thanks,

Jia

---

<div class="post-metadata">

### Author: ![Jia](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@Jia](https://forum.qiime2.org/u/Jia)
#### Post date: [January 11, 2019, 12:38am UTC](https://forum.qiime2.org/t/error-when-generating-pcoa-plot/7780/2 "2019-01-11T00:38:41Z")

</div>

Hi,

I realised I forgot to run one step **qiime diversity pcoa** before generating **qiime emperor plot**

Thanks,

Jia

---

<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: [February 11, 2019, 6:38am UTC](https://forum.qiime2.org/t/error-when-generating-pcoa-plot/7780/3 "2019-02-11T06:38:42Z")

</div>

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