Plugin error from feature-classifier: pop from empty list (but the taxonomy is not incomplete)


I am trying to assign taxonomy to my 16S samples using QIIME 2 version 2022.2 (and the SILVA 138 database release), but I received the "Plugin error from feature-classifier: pop from empty list" error when I ran the qiime feature-classifier classify-sklearn command:

qiime feature-classifier classify-sklearn \
    --i-classifier silva-138-ssu-nr99-515f-806r-classifier.qza  \
    --i-reads rep-seqs.qza \
    --o-classification taxonomy.qza \
    --p-read-orientation same

The error does not show up when I include the --p-confidence=disable option, but as per this post, I know it would be better to not use this option.

Numerous previous posts indicate this error means there is an issue with the classifier file. This post says an incomplete taxonomy will generate the error; however, I made my classifier file by following the RESCRIPt tutorial to create a consensus taxonomy, using the 'lca' option:

qiime rescript dereplicate \
    --i-sequences silva-138-ssu-nr99-seqs-filt.qza \
    --i-taxa silva-138-ssu-nr99-tax.qza \
    --p-rank-handles 'silva' \
    --p-mode 'lca' \
    --o-dereplicated-sequences silva-138-ssu-nr99-seqs-derep-lca.qza \
    --o-dereplicated-taxa silva-138-ssu-nr99-tax-derep-lca.qza

To my understanding, this command will fill empty lower-level taxonomy with empty place-holders. I confirmed that these place-holders were included in my file by visualizing my reference taxonomy file with this command:

qiime metadata tabulate \
    --m-input-file silva-138-ssu-nr99-tax-515f-806r-derep-lca.qza \
    --o-visualization silva-138-ssu-nr99-tax-515f-806r-derep-lca.qzv

Do you have any suggestions for what may be causing the error I am seeing? Perhaps there is still an issue with my classifier file, although I am not sure what that issue is. I would be happy to provide any necessary files for help with troubleshooting.

Thank you for your help; it is greatly appreciated!

Hi @ncep112 ,
Thanks for reporting your issue here.

This can be caused by even a single missing taxonomy. Could you please share the output of tabulate?

See also this topic — if you selected more than the standard 7 ranks then dereplicate lca mode will not work:

If you can find the taxonomy that is missing a rank (or even the entire annotation), you can use the replace-taxonomy action in RESCRIPt to edit the taxonomy.

As you are using the classify-sklearn classifier, I would recommend dereplicating with uniq mode, as the Naive Bayes classifier is essentially finding the LCA anyway.

Are you aware of the pre-trained classifiers available on the QIIME 2 data resources page?

There are pre-trained SILVA classifiers available there, trimmed to the 515f-806r region; but I am guessing that you want some customization (e.g., non-standard ranks), just want to make sure.

1 Like

Hi @Nicholas_Bokulich,

Thank you so much for your response! The problem was that I was trying to use the dereplicate lca mode with more than the 7 standard taxonomy ranks. I fixed this problem by taking your advice and using the uniq mode instead:

Thank you again for your help!

1 Like

Thanks for responding! As you can see from the other topic discussion, we have an open ticket to add support for more than 7 ranks, so this feature should be available some time in the future (contributions to the source code are welcome :wink: )

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