Plugin Error During SILVA Classifier Training

I am trying to create a SILVA classifier, just for my own experience - we already have an up to date one that we use in our research group but I want to see the steps that go into making one first hand so I have a better understanding of it.

I downloaded the SILVA 104 release (yes I know this is an old version) from this page: https://www.arb-silva.de/no_cache/download/archive/qiime/ and was using these files respectively for the database sequences and the reference taxonomy file.

I ran the following (from the Training Feature Classifier Tutorial, I guess I should also note that I have an outdated version of QIIME2 - 2018.8 if that could be driving where this error is arising from) command to train the classifier:

qiime feature-classifier fit-classifier-naive-bayes
–i-reference-reads silva-ref-seqs.qza
–i-reference-taxonomy silva-ref-taxonomy.qza
–o-classifier silva-classifier.qza

It took a surprisingly short time to be honest… I was expecting it to take a while to run but it took less than 5 minutes so I feel like something must be wrong with it. I then tested the classifier and got the plugin error “pop from empty list” (like this question it seems) .

Full print out of the error log:
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in classify_sklearn
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 362, in callable_executor
output_views = self._callable(**view_args)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_feature_classifier/classifier.py”, line 212, in classify_sklearn
reads, classifier, read_orientation=read_orientation)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_feature_classifier/classifier.py”, line 169, in _autodetect_orientation
result = list(zip(*predict(first_n_reads, classifier, confidence=0.)))
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_feature_classifier/_skl.py”, line 45, in predict
for chunk in _chunks(reads, chunk_size)) for m in c)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/parallel.py”, line 779, in call
while self.dispatch_one_batch(iterator):
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/parallel.py”, line 625, in dispatch_one_batch
self._dispatch(tasks)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/parallel.py”, line 588, in _dispatch
job = self._backend.apply_async(batch, callback=cb)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/_parallel_backends.py”, line 111, in apply_async
result = ImmediateResult(func)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/_parallel_backends.py”, line 332, in init
self.results = batch()
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/parallel.py”, line 131, in call
return [func(*args, **kwargs) for func, args, kwargs in self.items]
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/parallel.py”, line 131, in
return [func(*args, **kwargs) for func, args, kwargs in self.items]
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_feature_classifier/_skl.py”, line 52, in _predict_chunk
return _predict_chunk_with_conf(pipeline, separator, confidence, chunk)
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_feature_classifier/_skl.py”, line 79, in _predict_chunk_with_conf
classes = [cls for cls in classes if cls[0].pop(0) == level]
File “/opt/anaconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_feature_classifier/_skl.py”, line 79, in
classes = [cls for cls in classes if cls[0].pop(0) == level]
IndexError: pop from empty list

Is this an error due to the taxonomy or something else? Maybe it’s just time I update my QIIME2 as well… Any input on solving this issue would be great!

Looking at the other SILVA QIIME releases I am wondering now if it’s just an issue with the release number I downloaded…going to try a different one and hopefully that will solve it!

If that is the case, is there anything that can be done to get the older releases to work in training the classifiers?

1 Like

Hi @Ellenphant,
What was the name/path of the taxonomy file that you used?

This issue occurs when the reference taxonomy contains uneven numbers of ranks, so you need to find a taxonomy file with an even number of ranks. All of the QIIME-compatible releases of SILVA contain taxonomies with 7 levels, as well as full-length taxonomies (with an uneven number of ranks). You can determine this from the file name.

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