Convert QIIME1 OTU table to QIIME2

Hello,
I have a OTU tables with taxonomies created using QIIME 1.
How can I create from this data a phylogenetic tree, alpha and beta diversity analysis and heatmap using qiime2?

Hi @Hila_t,
Welcome to the forum!
To import the table into Qiime2 you can use the following, assuming your OTU table is in .biom format.

qiime tools import \
  --input-path otu_table.biom \
  --type 'FeatureTable[Frequency]' \
  --input-format BIOMV100Format \ # or whatever biom type you have
  --output-path feature-table.qza

This will import and crate your feature table.

Then you’ll need to import again to create a separate taxonomy artifact.

$ qiime tools import \
  --input-path otu_Table.biom \
  --output-path taxonomy.qza \
  --source-format BIOMV100Format \ # or whatever format 
  --type "FeatureData[Taxonomy]"

More exact details about other importing methods, you should check out the importing tutorial.

You can use these 2 files now for alpha, beta diversity analyses, I recommended following some of the available tutorials for step by step instructions on how to do these exactly, for example the Moving Pictures tutoria is a great place to start.
However, to build a tree you’ll need the actual sequences, not just the names of taxonomies. Does the biom table have these? Do you have access to the representative-sequences which was used to get your OTU table? You can import those separately and build a tree based on those (instructions in the tutorials linked)

2 Likes

Hi @Mehrbod_Estaki!
Thank you for your help.
I was able to create a feature table by command:
qiime tools import
--input-path hdf5.biom
--output-path feature-table.qza
--type "FeatureTable[Frequency]"
(Without format).

The problem is that I am not able to create a taxonomy artifact with the biom format.
The following error appears:
"There was a problem importing seq_table_L7.biom: seq_table_L7.biom is not a(n) TSVTaxonomyFormat file".

The biom file looks like this:


Is there any command that fits for that?

For the phylogenetic tree, I have a FASTA file that looks like this:


Is there a command that works for that?

Thank you!

Hi @Hila_t,

For the taxonomy file what have you defined as your source-format and types? If you leave it blank which I think you’ve done, it will default to TSVTaxonomyFormat thus the error.
The following should work…

$ qiime tools import \
  --input-path otu_Table.biom \
  --output-path taxonomy.qza \
  --source-format BIOMV100Format \ # or BIOMV210Format if you've transformed the biom
  --type "FeatureData[Taxonomy]"

For tree building, if the FASTA file you’ve provided is the representative sequences from the same table you should be able to import it by using:

qiime tools import \
--input-path rep-seqs.fasta \
--output-path rep.seq.qza \
--source-format DNAFASTAFormat \
--type "FeatureData[Sequence]"

However, now that I looked at your sample image I should mention that your FASTA file does not look it follows the regular convention of 2 liners per record. I only see 1 line per record which would not work for the import command above as indicated here.
Unfortunately you’ll need to figure out how to get this convention before importing that into qiime2, maybe try picking rep-seqs again in qiime1? I’ve never seen a fasta without line breaks tbh so not sure what to recommend.

Another alternative which will take a bit of extra time is to simply run your whole protocol from raw read in Qiime2. Assuming you have the original .fastq files. You are only 2-3 steps away from where you currently are (import, dumultiplex, and denoise) and you would be utilizing superior methods plus the added bonus of provenance tracking for duplication purposes. You also wouldn’t have to worry about converting file formats. Just a thought!

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