Issue while importing the SILVA database's consensus taxonomy file

Hello there! I am new in QIIME2 and I was facing in the Silva classifier training. I am using the qiime2 2019.7 version, installed using the conda env. and I downloaded the SILVA_132_QIIME_release.
Anyway, I am having a little issue during the import of the consensus_taxonomy_7_levels.txt file.

My command is:
qiime tools import --type FeatureData[Taxonomy] --input-format HeaderlessTSVTaxonomyFormat --input-path SILVA_132_QIIME_release/taxonomy/16S_only/99/consensus_taxonomy_7_levels.txt --output-path Taxonomy/silva_trained_first/consensus-taxonomy.qza

and the result is:
Traceback (most recent call last):
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/builtin/tools.py”, line 154, in import_data
view_type=input_format)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/result.py”, line 241, in import_data
validate_level=‘max’)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/result.py”, line 267, in _from_view
result = transformation(view, validate_level)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/core/transform.py”, line 70, in transformation
new_view = transformer(view)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/core/transform.py”, line 220, in wrapped
file_view = transformer(view)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_types/feature_data/_transformer.py”, line 177, in _20
_taxonomy_formats_to_dataframe(str(ff), has_header=False))
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_types/feature_data/_transformer.py”, line 51, in _taxonomy_formats_to_dataframe
header=None, dtype=object)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/pandas/io/parsers.py”, line 702, in parser_f
return _read(filepath_or_buffer, kwds)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/pandas/io/parsers.py”, line 435, in _read
data = parser.read(nrows)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/pandas/io/parsers.py”, line 1139, in read
ret = self._engine.read(nrows)
File “/Users/aclab/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/pandas/io/parsers.py”, line 1995, in read
data = self._reader.read(nrows)
File “pandas/_libs/parsers.pyx”, line 899, in pandas._libs.parsers.TextReader.read
File “pandas/_libs/parsers.pyx”, line 914, in pandas._libs.parsers.TextReader._read_low_memory
File “pandas/_libs/parsers.pyx”, line 968, in pandas._libs.parsers.TextReader._read_rows
File “pandas/_libs/parsers.pyx”, line 955, in pandas._libs.parsers.TextReader._tokenize_rows
File “pandas/_libs/parsers.pyx”, line 2172, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 2 fields in line 67737, saw 3

An unexpected error has occurred:

Error tokenizing data. C error: Expected 2 fields in line 67737, saw 3

See above for debug info.

I really cannot understand what the error is. Hope someone could help me!
Thanks in advance

1 Like

Hi @Claudio21,

Welcome :qiime2:!

I am unsure of what the issue might be concerning your command. I was able to successfully import the taxonomy file on my laptop using the following command:

qiime tools import  \
      --type 'FeatureData[Taxonomy]'  \
      --input-format HeaderlessTSVTaxonomyFormat \
      --input-path taxonomy/16S_only/99/consensus_taxonomy_7_levels.txt \
      --output-path 16s-only-7level.qza

There are a couple of other options you can try until we can figure out why the import is not working:

  1. You can download pre-compiled classifiers from the Data resources page.
  2. We are currently making strides to refine the SILVA reference files. There is an updated prototype available. This stemmed out of prior discussions on the forum you can read about here and here. Keep in mind that SILVA will be soon undergoing a substantial change in how it manages taxonomy, etc. Keep an eye out for these to occur sometime in November.

-Mike

1 Like

I just realized, that I forgot to clarify this: notice that I used quotes around 'FeatureData[Taxonomy]'. While your original command does not

-Mike

2 Likes