plugin error from diversity -alpha rarefaction

I am running the comment below:
qiime diversity alpha-rarefaction
--i-table ./DADA2_denoising_output/table.qza
--p-min-depth 5000 –p-max-depth 50000
--p-steps 10
--p-metrics shannon simpson dominance observed_features chao1 faith_pd michaelis_menten_fit
--i-phylogeny ./phylogenetic_tree/rooted_tree.qza --m-metadata-file metadata_new.tsv
--o-visualization alpha_rarefaction/rarefaction_curves_5000.qzv

And the the following error:

Plugin error from diversity:

Parameter 'metrics' received {'chao1', 'faith_pd', 'shannon', 'michaelis_menten_fit--i-phylogeny', './phylogenetic_tree/rooted_tree.qza', 'simpson', 'observed_features', 'dominance'} as an argument, which is incompatible with parameter type: Set[Str % Choices('ace', 'berger_parker_d', 'brillouin_d', 'chao1', 'dominance', 'doubles', 'enspie', 'faith_pd', 'fisher_alpha', 'gini_index', 'goods_coverage', 'heip_e', 'lladser_pe', 'margalef', 'mcintosh_d', 'mcintosh_e', 'menhinick', 'michaelis_menten_fit', 'observed_features', 'pielou_e', 'robbins', 'shannon', 'simpson', 'simpson_e', 'singles')]

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

Thanks for you help!

Hi @Vani,

The following should work:

qiime diversity alpha-rarefaction \
    --i-table ./DADA2_denoising_output/table.qza \
    --p-min-depth 5000 \
    --p-max-depth 50000 \
    --p-steps 10 \
    --p-metrics shannon \
    --p-metrics simpson \
    --p-metrics dominance \
    --p-metrics observed_features \
    --p-metrics faith_pd \
    --p-metrics chao1  \
    --p-metrics michaelis_menten_fit \
    --i-phylogeny ./phylogenetic_tree/rooted_tree.qza \
    --m-metadata-file metadata_new.tsv \
    --o-visualization alpha_rarefaction/rarefaction_curves_5000.qzv
1 Like

Thanks but the same error is being displayed with this command as well.

Hi @Vani,

That is very odd... :thinking: What version of QIIME 2 are you running?

I just ran the following via qiime2-amplicon-2025.4... I've appended all your listed metrics to the command outlined in this tutorial, with other minor modifications for testing ...

qiime diversity alpha-rarefaction \
   --i-table ./filtered-table-4.qza \
   --i-phylogeny ./rooted_tree.qza \
   --m-metadata-file ./sample-metadata.tsv \
   --p-min-depth 100 \
   --p-max-depth 33000 \
   --p-steps 4 \
   --p-iterations 2 \
   --p-metrics shannon \
   --p-metrics simpson \
   --p-metrics dominance \
   --p-metrics observed_features \
   --p-metrics faith_pd \
   --p-metrics chao1  \
   --p-metrics michaelis_menten_fit \
   --o-visualization ./rarefaction-plot.qzv

... and it appeared to have worked w/o issues.

Looking at your error again, specifically:

I suspect you are entering the command into your terminal incorrectly. That is... the action thinks you are sending the following to the --p-metrics flag:

shannon simpson dominance observed_features chao1 faith_pd michaelis_menten_fit--i-phylogeny ./phylogenetic_tree/rooted_tree.qza

... Note that the michaelis_menten_fit--i-phylogeny is contained within that statement without a space. This is why, the error is complaining that --p-metrics can not take michaelis_menten_fit--i-phylogeny and only take the following:

'ace', 'berger_parker_d', 'brillouin_d', 'chao1', 'dominance', 'doubles', 'enspie', 'faith_pd', 'fisher_alpha', 'gini_index', 'goods_coverage', 'heip_e', 'lladser_pe', 'margalef', 'mcintosh_d', 'mcintosh_e', 'menhinick', 'michaelis_menten_fit', 'observed_features', 'pielou_e', 'robbins', 'shannon', 'simpson', 'simpson_e', 'singles

If you are entering commands into the terminal across multiple lines, you must make sure that you end each line with a \ character, as I show above (as well as checking for whitespace errors). If you are doing this, and it is still failing... try typing in the command manually to make sure copy / paste is not carrying over invalid and hidden characters.

Thanks Mike. Got it sorted

1 Like