How can I generate a table of diversity metric values?

Hi all,

I am trying to generate a table of alpha diversity metrics (shannon, pielou, etc). I used the following command to generate a qza that (from what I understand) should contain the shannon diversity values for all of my samples.

qiime diversity alpha
–i-table fff-table.qza
–p-metric shannon
–o-alpha-diversity fff-shannon.qza

From what I understand from the diversity plugin page (see below), this fff-shannon.qza file should have the shannon diversity calculated for all of my samples as a vector.

I want to be able to see these values so that I can put them in a spreadsheet for other uses, but I’m not sure how. Any help would be excellent!

I’ve done the moving pictures tutorial, and I’ve done some stuff with “alpha significance,” but nothing I’ve found seems to tell me how to just get the diversity metric values. Thanks in advance for any help!

Hi @bpscherer,

if you want to export your data, see this tutorial:

note that those alpha values will not be rarefied.

You could also visualize the results using qiime metadata tabulate, this will allow you to search in the table as well as download a TSV that you can open in excel.

I hope that helps!

Okay, I think I figured it out (though if there is an easier way I’d love to know)

I can test whether each diversity metric differs based on metadata and generate a qzv using the following.

qiime diversity alpha-group-significance
–i-alpha-diversity fff-shannon.qza
–m-metadata-file metadata.tsv
–o-visualization fff-shannon.qzv

Then, when I open the qzv in view.qiime, I can click “download raw data” and I get a tsv with all the shannon diversities.

Is this the easiest way?

the easiest way is to use qiime tools export, and that will also allow you to do this programmatically, e.g., if you are making a pipeline to export and stitch together multiple results.

1 Like

Awesome, thank you so much!

1 Like

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