Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After recent Qiita update, "Principal Coordinate Analysis Biplot [pcoa_biplot] (qiime2 2022.11.1)" now fails #3266

Closed
ElDeveloper opened this issue Mar 10, 2023 · 5 comments · Fixed by qiita-spots/qp-qiime2#78

Comments

@ElDeveloper
Copy link
Member

Error executing Principal Coordinate Analysis Biplot [pcoa_biplot]: ['Traceback (most recent call last):\n', ' File "/home/qiita/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/qiita_client/plugin.py", line 265, in call\n success, artifacts_info, error_msg = task(\n', ' File "/home/qiita/miniconda3/envs/qiime2-2022.11/lib/python3.8/site-packages/qiita_client/plugin.py", line 105, in call\n return self.function(qclient, server_url, job_id, output_dir)\n', ' File "/home/qiita/qiita_spots/qp-qiime2/qp_qiime2/qp_qiime2.py", line 536, in call_qiime2\n atype = Q2_QIITA_SEMANTIC_TYPE[str(q2artifact.type)]\n', 'KeyError: "PCoAResults % Properties('biplot')"\n']

Using 'Unweighted Unifrac PCoA results', and a collapsed, rarefied, 'relative frequency table'


Reported by @ekunselman biocore/emperor#814

@antgonza
Copy link
Member

Looking much closer to this issue, the problem is how the output is defined in that method (pcoa_biplot) and I'm not sure what is the best way forward. Specifically,

In [9]: pm.plugins['diversity'].methods['pcoa'].signature.outputs['pcoa']
Out[9]: ParameterSpec(qiime_type=PCoAResults, view_type=<class 'skbio.stats.ordination._ordination_results.OrdinationResults'>, default=NOVALUE, description='The resulting PCoA matrix.')

In [10]: pm.plugins['diversity'].methods['pcoa_biplot'].signature.outputs['biplot']
Out[10]: ParameterSpec(qiime_type=PCoAResults % Properties('biplot'), view_type=<class 'skbio.stats.ordination._ordination_results.OrdinationResults'>, default=NOVALUE, description='The resulting PCoA matrix.')

as you can see the issue is the Properties value, which AFAIK is the only parameter in the default plugins to have that property. Is there a reason to be this way?

Anyway, we can hardcode something but just wondering if having a Property is actually required; @ElDeveloper what do you think?

@antgonza
Copy link
Member

A full fix for this would be to support the Properties definition in the qp-qiime2 plugin; however, at this point I'm not sure this is necessary as there is only one method/output that uses that. Thus, decided to go with the simplest solution via qiita-spots/qp-qiime2#78.

@ElDeveloper
Copy link
Member Author

For completeness, you are right that q2-diversity only uses this as syntactic sugar. However q2-emperor uses this to determine whether it should display a biplot or a standard plot. And q2-emperor.plot will throw an error if there are "arrows" in the ordination, unless ignore-pcoa-features is set to True.

@antgonza
Copy link
Member

antgonza commented Mar 15, 2023 via email

@ElDeveloper
Copy link
Member Author

Might be? I am actually confused as to how that biplot was loaded in the system in the first place. Considering the Properties exception reported in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants