Where can I find a tutorial showing how to use beta_diversity.py (QIIME1) equivalent in QIIME2 for PERMANOVA?

  • Version of QIIME 2 you are running, and how it is installed (e.g. Virtualbox, conda, etc.): qiime2-2019.10, installed through conda
  • What is the exact command or commands you ran? beta_diversity.py -I table.txt -o processed -m bray_curtis_faith.
  • What is the exact error message, if applicable? “Invalid Syntax”

I have used a PERMANOVA protocol developed by PI in the lab with QIIME1. I still need the PERMANOVA test to see if a PCoA plot clustering is significant. How do I run a PERMANOVA test in QIIME2?

The protocol for QIIME1 is here: https://drive.google.com/open?id=1xfw0-7jVba2XHvwrAAnu8VMt-r3STx7I

What will be equivalent QIIME2 workflow?

Hi @ehossain !

I think that the “Alpha and beta diversity analysis” section of the moving pictures tutorial would be informative for you:

I would also add a clarification to your interpretation of the PERMANOVA test. As stated in the tutorial, the PERMANOVA will

test whether distances between samples within a group, such as samples from the same body site (e.g., gut), are more similar to each other then they are to samples from the other groups (e.g., tongue, left palm, and right palm)

This is slightly different than “seeing if a PCoA plot clustering is significant” because the PCoA plot is an approximate representation of the distances between samples.

Let me know if I can provide any more clarification!


Hello @gwarmstrong!
Thank you so much for pointing towards the tutorial. I just did it. I think I have a comfortable idea how to do the PERMANOVA. The only problem I have now is the “Data File” format. Let me explain below:

My work is in small molecule Metabolomics (Mass Spectrometry). The CSV file that I use to generate PCoA plots) can be found here: https://drive.google.com/open?id=1yafrTPBwLh-4PfKgiHphH6bB6Yp21npW

My feature table would be this same file minus the metadata.

So the fist column contains Sample names (each row is an unique sample).

From 2nd column through n-th column I have peak ares corresponding to m/z (mass to charge ratio) values. These will be my unique features. Kinda similar to gene sequence in a sample.

This is not a well defined FASTA file. So how do I get started the very point of data importing?

Also does any of the headers in metadata/feature table has to be written in a specific format?

I think if I know how to import a CSV or XLSX “data file”, I can get started. Any tips in this regard? Thank you again.

1 Like

So there is an open issue about importing CSV/TSV format directly…

This will take a couple steps:

  1. Import the CSV to a biom table using biom convert. These two threads will hopefully be a good starting point.
  1. Import the biom table with qiime tools import. See this tutorial.
1 Like

Q2 secret: you could also use qiime sample-classifier metatable to import and convert a TSV directly to a feature table. This method was designed for merging metadata into feature tables for specific purposes but if you only input a TSV format observation matrix it will do the conversion and import in one go.


See this tutorial: https://docs.qiime2.org/2019.10/tutorials/metadata/

You can check out qiime2.org for more tutorials and other info on getting started with QIIME 2.

Good luck!


Thank you so much @Nicholas_Bokulich. That command of passing the .tsv feature table as metadata and not providing the source does import the file as .qza and I was able to do my first PERMANOVA test on QIIME2 after that. I guess this thread can closed as “Solved”.

1 Like

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