How to get abundance table like QIIME 1.9.0

I took QIIME 1.9.0 for 16S sequencing data analyzing before. I can get the microbes abundance table named otu_table_mc2_w_tax_no_pynast_failures_L6.txt and OTU table file as follows:

Abundance table file:

OTU table file:

Now, I am learning how to analyse meta data by QIIME 2.0. However, I have no idea about producing similar tables or files in QIIME 1.9.0. I've tried extract something from taxonomy.qza by command qiime tools extract taxonomy.qza, and I still couldn't get the file I want.

Any help would much be appreciated!
Thank you.

1 Like

Hi @Yujun, thanks for writing! From what I understand, you are looking for help with annotating taxonomy metadata to a feature table, and collapsing these data to some specified taxonomic level (judging from your filename otu_table_mc2_w_tax_no_pynast_failures_L6.txt, that is).

The q2-taxa plugin has a method called collapse, which is able to do the first part of what you are looking for. Make sure that you have this plugin installed before proceeding. You can do that by running:

$ qiime info

If you don’t see taxa listed under Installed plugins, then install by running the following in your activated conda environment:

$ conda install -c qiime2 q2-taxa

There is an example of how to do this in the “Moving Pictures” tutorial on the docs site:

$ qiime taxa collapse \
  --i-table table.qza \
  --i-taxonomy taxonomy.qza \
  --p-level 2 \
  --o-collapsed-table table-l2.qza

For the “Moving Pictures” tutorial, the input file table.qza is the feature table that is emitted from the qiime dada2 denoise step, and the input file taxonomy.qza is emitted from the qiime feature-classifier classify step.

Once you have the collapsed table (table-l2.qza), you can extract the BIOM file for your downstream analyses:

$ qiime tools extract table-l2.qza


Extracted to /Users/matthew/moving-pictures/ec02f06d-943b-43e6-9450-17aa99a23178
$ biom head -i ec02f06d-943b-43e6-9450-17aa99a23178/data/feature-table.biom


# Constructed from biom file
#OTU ID L1S105  L1S140  L1S208  L1S257  L1S281
k__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Bacillaceae;g__Bacillus   0.0     0.0     0.0     0.0     0.0
k__Bacteria;p__Proteobacteria;c__Alphaproteobacteria;o__Rhodobacterales;f__Rhodobacteraceae;g__Rhodobacter      0.0     0.0     0.0     0.0   0.0
k__Bacteria;p__Proteobacteria;c__Betaproteobacteria;o__Burkholderiales;f__Burkholderiaceae;g__Lautropia 0.0     0.0     0.0     0.0     0.0
k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__Porphyromonadaceae;g__Parabacteroides   0.0     137.0   249.0   560.0   233.0
k__Bacteria;p__Proteobacteria;c__Betaproteobacteria;o__Neisseriales;f__Neisseriaceae;g__Vogesella       0.0     0.0     0.0     0.0     0.0



You can also use the export command instead:

qiime tools export qiime2/moving-pictures-tutorial/table-l2.qza \
    --output-dir example-directory/
ls example-directory/



Thank you very much! It worked for me.

1 Like