Plugin error from diversity - alpha diversity

I tried to run the following code.

qiime diversity alpha \
> --i-table pa-table-ct01.qza \
> --p-metric shannon \
> --o-alpha-diversity alpha-diversity.qza

The following error occurred. What is the error and how can I fix it?

Plugin error from diversity:

  Parameter 'table' requires an argument of type FeatureTable[Frequency | RelativeFrequency]. An argument of type FeatureTable[PresenceAbsence] was passed.

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

Thank you for help.

Hi @sooni ,

This error message is exactly as it says. You are using the wrong type of table. Shannon diversity is calculated based on abundance information, so presence-absence would give misleading results. You need to input the correct type of feature table, as the error message says.

good luck!

1 Like

Is there a separate input data type corresponding to FeatureTable[PresenceAbsence]?

No, Shannon does not work with presence-absence data. You need to choose a different metric, or use from the feature table types listed in the error message.


What metric should I use for FeatureTable[PresenceAbsence] data?

hi @sooni you can check the individual documentation and formulae to see which metrics are suitable for you. Observed features is one that will work with presence/absence.

I checked the individual documentation and formulae, but I still don't know what metric should I use. Although alpha diversity was not performed, beta diversity was performed using the jaccard metric. If beta diversity was performed with jaccard, what metric should be used to perform alpha diversity?
Thank you for help.

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