alpha-rarefaction diversity

I am doing alpha-rarefaction diversity

How can I get these four diversity one time:

observed_otus, shannon, fisith_pd, evenness

qiime diversity alpha-rarefaction
–i-table /projects/aces/lbhuang/data/Nrate/Nrate_table-dada2.qza
–i-phylogeny /projects/aces/lbhuang/data/Nrate/Nrate_rooted-tree.qza
–p-max-depth 28600
–p-matrics observed_otus, shannon, fisith_pd, evenness
–m-metadata-file /projects/aces/lbhuang/data/Nrate/Nratemap.txt
–o-visualization /projects/aces/lbhuang/data/Nrate/Nrate_core-diversity/Nrate_alpha-rarefaction.qzv

Hi @laibinhuang,

Do you mean how to get those metrics all at once in one command? If so, simply use the --p-metrics multiple times with the different metrics on each line. Also note the typo in your current commands matrics should be metrics.

Yes, I want to get all four at once

qiime diversity alpha-rarefaction
–i-table /projects/aces/lbhuang/data/Nrate/Nrate_table-dada2.qza
–i-phylogeny /projects/aces/lbhuang/data/Nrate/Nrate_rooted-tree.qza
–p-max-depth 28600
–p-metrics observed_otus, shannon, faith_pd, evenness
–m-metadata-file /projects/aces/lbhuang/data/Nrate/Nratemap.txt
–o-visualization /projects/aces/lbhuang/data/Nrate/Nrate_core-diversity/Nrate_alpha-rarefaction.qzv

Thank you very much

But when I do this
qiime diversity alpha-rarefaction
–i-table /projects/aces/lbhuang/data/Nrate/Nrate_table-dada2.qza
–i-phylogeny /projects/aces/lbhuang/data/Nrate/Nrate_rooted-tree.qza
–p-max-depth 28600
–p-metrics observed_otus
–p-metrics shannon
–p-metrics faith_pd
–p-metrics evenness
–m-metadata-file /projects/aces/lbhuang/data/Nrate/Nratemap.txt
–o-visualization /projects/aces/lbhuang/data/Nrate/Nrate_core-diversity/Nrate_alpha-rarefaction.qzv

I got an error

plygin error from diversity:
‘set’ object has no attibute ‘type’

1 Like

Hi @laibinhuang,
Are you copy pasting these commands as above or are you typing them out manually in terminal? To copy paste them you want a add the \ forward slash at the end of each line.
If this isn’t the issue can you copy paste the exact commands you run and the exact full error message you get. You can add the --verbose parameter also in case there is more thorough error detail.

Please check the commands I run Thank you very much.
it is not \ problem, if I delete all --p-metrics evenness --p-metrics faith_pd --p-metrics shannon --p-metrics observed_otus --p-metrics dominance, it works, but just give me default three values.

(qiime2-2019.1) [email protected]:~$ qiime diversity alpha-rarefaction --i-table /media/sf_Data/Nrate/Nrate16S/Nrate16S_table-dada2.qza --i-phylogeny /media/sf_Data/Nrate/Nrate16S/Nrate16S_rooted-tree.qza --p-max-depth 28600 --m-metadata-file /media/sf_Data/Nrate/Nratemap.txt --p-metrics evenness --p-metrics faith_pd --p-metrics shannon --p-metrics observed_otus --p-metrics dominance --o-visualization /media/sf_Data/Nrate/Nrate16S/Nrate16s_core-diversity/alphararefaction4.qzv
Plugin error from diversity:

‘set’ object has no attribute ‘type’

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

Hi @laibinhuang - please rerun with the --verbose flag, and copy and paste all the results. Thanks!

Please check this, thank you very much

(qiime2-2019.1) [email protected]:~$ qiime diversity alpha-rarefaction --i-table /media/sf_Data/Nrate/Nrate16S/Nrate16S_table-dada2.qza --i-phylogeny /media/sf_Data/Nrate/Nrate16S/Nrate16S_rooted-tree.qza --p-max-depth 28600 --m-metadata-file /media/sf_Data/Nrate/Nratemap.txt --p-metrics evenness --p-metrics faith_pd --p-metrics shannon --p-metrics observed_otus --p-metrics dominance --o-visualization /media/sf_Data/Nrate/Nrate16S/Nrate16s_core-diversity/alphararefaction4.qzv --verbose
Traceback (most recent call last):
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “</home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-409>”, line 2, in alpha_rarefaction
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 199, in bound_callable
self.signature.check_types(**user_input)
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/core/type/signature.py”, line 301, in check_types
name, kwargs[name].type, spec.qiime_type))
AttributeError: ‘set’ object has no attribute ‘type’

Plugin error from diversity:

‘set’ object has no attribute ‘type’

See above for debug info.

any idea come out with the following error (appreciate)

(qiime2-2019.1) [email protected]:~$ qiime diversity alpha-rarefaction --i-table /media/sf_Data/Nrate/Nrate16S/Nrate16S_table-dada2.qza --i-phylogeny /media/sf_Data/Nrate/Nrate16S/Nrate16S_rooted-tree.qza --p-max-depth 28600 --m-metadata-file /media/sf_Data/Nrate/Nratemap.txt --p-metrics evenness --p-metrics faith_pd --p-metrics shannon --p-metrics observed_otus --p-metrics dominance --o-visualization /media/sf_Data/Nrate/Nrate16S/Nrate16s_core-diversity/alphararefaction4.qzv --verbose
Traceback (most recent call last):
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “</home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-409>”, line 2, in alpha_rarefaction
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 199, in bound_callable
self.signature.check_types(**user_input)
File “/home/qiime2/miniconda/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/core/type/signature.py”, line 301, in check_types
name, kwargs[name].type, spec.qiime_type))
AttributeError: ‘set’ object has no attribute ‘type’

Plugin error from diversity:

‘set’ object has no attribute ‘type’

See above for debug info.
[/quote]

Hi @laibinhuang!

That error message has been improved in newer versions of QIIME 2. Basically, you provided an invalid metric (evenness). If you check the help text, you will notice there is no metric by that name. Simply remove and re-run, you should be all set!

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