q2-coordinates errors

Hi,

I installed q2-coordinates following the tutorial here (GitHub - nbokulich/q2-coordinates: methods for geographic mapping of qiime2 artifact data or metadata). I used the test data downloaded from GitHub - nbokulich/q2-coordinates: methods for geographic mapping of qiime2 artifact data or metadata.

Here are the test code and errors:

qiime coordinates geodesic-distance
--m-metadata-file chardonnay_sample_metadata.txt
--p-latitude latitude
--p-longitude longitude
--o-distance-matrix geodesic_distance_matrix_sample2.qza
Traceback (most recent call last):
File "/Users/xiaopinghe/miniconda3/envs/q2coord/bin/qiime", line 11, in
sys.exit(qiime())
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/click/core.py", line 1137, in call
return self.main(*args, **kwargs)
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/click/core.py", line 1061, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/click/core.py", line 923, in make_context
self.parse_args(ctx, args)
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/q2cli/click/command.py", line 43, in parse_args
return super().parse_args(ctx, args)
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/click/core.py", line 1624, in parse_args
rest = super().parse_args(ctx, args)
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/click/core.py", line 1375, in parse_args
parser = self.make_parser(ctx)
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/q2cli/click/command.py", line 33, in make_parser
param.add_to_parser(parser, ctx)
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/click/core.py", line 2663, in add_to_parser
const=self.flag_value,
File "/Users/xiaopinghe/miniconda3/envs/q2coord/lib/python3.6/site-packages/q2cli/click/parser.py", line 127, in add_option
const=const, obj=obj)
TypeError: init() got multiple values for argument 'obj'

I wonder what the problem is. Thanks.

Hi @eDNA ,
Thanks for trying out q2-coordinates!

Just to note, the main project page has moved here, I have now updated this in the QIIME 2 library. The version you are using (from my personal branch) would be a bit out of date.

Now the error you are getting: q2-coordinates has not been updated yet to be compatible with the latest release of QIIME 2 (2021.4). I believe the last compatible release was QIIME 2 version 2021.2, so try installing q2-coordinates in a 2021.2 environment and let me know if that works for you!

Good luck!

I followed the latest q2-coordinates tutorial. I have installed a few versions of QIIME2. How to install q2-coordinates in a specific QIIME2 environment (e.g. 2021.2)? According to the tutorial, q2-coordinates is installed in q2coord environment.

Good point... those instructions assume that the latest release of QIIME 2 is compatible (and we are working to update it to be compatible, it should be in the coming weeks).

To install in a specific environment:

  1. install QIIME 2 in a new conda environment. Here are the instructions for 2021.2:
    Natively installing QIIME 2 — QIIME 2 2021.2.0 documentation
  2. activate your environment (assuming here that you called your environment qiime2-2021.2):
conda activate qiime2-2021.2
  1. install q2-coordinates in that environment:
pip install git+https://github.com/bokulich-lab/q2-coordinates.git
  1. [optional] depending on which method you want to use, you might also need to install some additional dependencies (but some commands will work without these):
  -c conda-forge -c bioconda -c qiime2 -c defaults \
  "pysal==2.0" geopy "cartopy==0.16"
  1. make sure to refresh your cache with qiime dev refresh-cache

Let me know if that works for you!

1 Like

Thanks a lot for your help.

I followed the tutorial here (GitHub - nbokulich/q2-coordinates: methods for geographic mapping of qiime2 artifact data or metadata) and used “source activate qiime2-2021.2” instead of “conda activate q2coord”.

It works well!

2 Likes

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