Error in reconstructing the phylogenetic tree

Hi, when I tried to reconstruct the phylogenetic tree using q2-sidle, the verbose appeared as follows:

Plugin error from sidle:

  "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Index(['A45315.1.1521', 'AACE03000034.3.1790', 'AACF01000230.1893.3681',\n       'AACG02000231.1096.2885', 'AACH01000259.1362.3151',\n       ...\n       'Z96079.1.1495', 'Z96086.1.1496', 'Z96087.1.1498', 'Z96090.1.1485',\n       'Z96095.1.1484'],\n      dtype='object', name='db-seq', length=19282). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"

Debug info has been saved to /tmp/qiime2-q2cli-err-ha2byutu.log

The qiime2-q2cli-err-ha2byutu.log showed that:

Traceback (most recent call last):
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-227>", line 2, in reconstruct_fragment_rep_seqs
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2_sidle/_tree.py", line 82, in reconstruct_fragment_rep_seqs
    aligned_sequences.loc[reconstruction_map.index]
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/pandas/core/indexing.py", line 895, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/pandas/core/indexing.py", line 1113, in _getitem_axis
    return self._getitem_iterable(key, axis=axis)
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/pandas/core/indexing.py", line 1053, in _getitem_iterable
    keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False)
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/pandas/core/indexing.py", line 1266, in _get_listlike_indexer
    self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
  File "/home/yaoxq/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/pandas/core/indexing.py", line 1321, in _validate_read_indexer
    raise KeyError(
KeyError: "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Index(['A45315.1.1521', 'AACE03000034.3.1790', 'AACF01000230.1893.3681',\n       'AACG02000231.1096.2885', 'AACH01000259.1362.3151',\n       ...\n       'Z96079.1.1495', 'Z96086.1.1496', 'Z96087.1.1498', 'Z96090.1.1485',\n       'Z96095.1.1484'],\n      dtype='object', name='db-seq', length=19282). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"

How to deal with it? Thanks for your time and help!

Hi @wqrao,

Welcome to the :qiime2: forum!

Which version of qiime2 are you using and which version of Sidle do you have?

Thanks,
Justine

Hello @jwdebelius,
Thanks for your timely help. I am using qiime2-2021.8 and the plugin 'sidle' version is 2020.08 (from package 'q2-sidle' version 2021.2.dev0).

Thanks! The versions should be up to date between python and pandas. Which database and tree are you trying to combine? The error says that at least one of the sequences in the remapped database doesn't match the alignment sequences passed, which potentially suggests mixing database versions.

Best,
Justine

Thanks.
1.The pandas version is 1.2.5 and python version is 3.8.10 in my environment. Do I still need to update them?
2. I used “silva-138-99-seqs.qza” as a reference database and this code qiime sidle reconstruct-fragment-rep-seqs --i-reconstruction-map recdb_map.qza --i-reconstruction-summary recdb_summary.qza --i-aligned-sequences aligned_silva_seqs.qza --o-representative-fragments rec_rep_seq_fragments.qza
I still have no idea how to deal with it. Could you help me once more? Thanks a lot.

Hi @wqrao,

The Silva 138 database doesn't currently work for fragment insertion. You must use the Silva 128 database. Sidle is one of the few cases where the database and version must match exactly for fragment insertion.

Best,
Justine

Hello @jwdebelius ,

Ohhh!!! Thanks for your timely reply. I will change the reference database and try it again.

Another question I want to ask is that the processing time is so long when using the Silva database, is there any solution?

1 Like

Hi @wqrao,

The Silva database is quite large; alignment requires searching through every sequence in a region for a match. Untangling the database means you're working wtih every one of those sequences across all the regions.

There are a few choices. You could check your filtering parameters (more degenerate sequences => longer run time). You can modify the number of threads or modify the kernel (the parallelization is handled through dask and you can set up your own cluster and pass it in or just modify the number of threads.) You could also switch to a smaller database. The most comprehensive option (and the only other one with a tree) would be greengenes 13_8. Greengenes is about 1/10 the size of Silva, so there are fewer options => better run time.

Best,
Justine

1 Like

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