Filter chloroplast from repseq and featuretable for alpha and betadiversity

Hi. All good day. I was following the Atacama and moving pictures tutorial on my analysis using Qiime 2017.7.

I found some work around for the analysis that i need such as generating featuretable.biom (similar to Qiime1) with the taxonomy metadata using the qiime taxa collapse. I am thinking of exporting the generated featuretable.biom in Qiime1.9.1 to filter chloroplast, mitochondria and other unwanted sequences.

However, I cannot think of any work around to use the filter featuretable.biom generated in Qiime1 in order to be used in alpha and beta diversity in Qiime2 based on the moving picture tutorial ( I think it is really impossible.) For example,

qiime diversity core-metrics
–i-phylogeny rooted-tree.qza (i want to filter unwanted sequences in rep seq)
–i-table table.qza (i want to used the featuretable.biom filtered in Qiime1 in here)
–p-sampling-depth 1109
–output-dir core-metrics-results

If not, is there away that I can filter chloroplast, mitochondria and other unwanted sequences from the featuredata[sequences] and featuretable[frequency] prior generating tree for phylogenetic diversity analyses? I wanted the rooted-tree.qza and table.qza to be free of other sequences (chloroplast, mitochondria).

Please do let me know that what i what to do in here is correct. Thank you very much.

Hi @Mike26!

That should work, you can use qiime tools export to export your data in a QIIME 1-compatible format (check out the exporting tutorial for details).

We’ll have more direct ways of filtering unwanted sequences in QIIME 2 in the future – we’ll follow up here when it’s available!

You can import your filtered .biom file into a FeatureTable[Frequency] artifact (.qza file) using qiime tools import. Check out this section of the importing tutorial for details. After importing, you can supply your feature table artifact to the core-metrics command with --i-table.

To produce a new rooted tree from only the filtered representative sequences, you’ll need to:

  1. Export your representative sequences (i.e. your FeatureData[Sequence] artifact) using qiime tools export.
  2. Use QIIME 1 to filter them, similar to what you did with filtering your .biom file.
  3. Import your filtered representative sequences using qiime tools import. See this section of the importing tutorial for details.
  4. Follow the steps in this section of the Moving Pictures tutorial to create a rooted phylogenetic tree from your filtered representative sequences.
  5. Supply the rooted tree to the core-metrics command with --i-phylogeny.

Note: be sure to run qiime feature-table summarize on your filtered feature table to determine a good even sampling depth for your data set. The even sampling depth of 1109 used in the Moving Pictures tutorial was chosen specific to that data set and may not work well with your data.

Hi @jairideout Thanks for the reply. I successfully filter the chloroplast and mitochondrial sequences in qiime1.9.1 using the

However, when I tried to filter the chloroplast and mitochondrial sequences in the feature-table.biom. in qiime1.9.1 using the command i got this error:

UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte

(Note that i run qiime taxa collapse to have an otutable with taxonomy and feature count in single file and then, export the feature-table as suggested.)

I noticed that the error was caused by differences in the otutable structure of the feature-table.biom when run in qiime 1-.9.1. I convert the otutable generated in qiime1 and the feature-table.biom in qiime2 for comparison which I attached in here. As you can see in the feature-table_fromQIIME2.tsv the #OTU ID column contain the "taxonomy metadata" instead of the "OTU ID". Secondly, the "taxonomy column was empty which must contain the "taxonomy metadata".

Is there a way to fix the error in the structure of the feature-table.biom so that it can be compatible with QIIME 1.9.1. I am stuck with this error for two days now.
feature-table_fromQIIME2.tsv (33.7 KB)
otutable_from QIIME1.tsv (246.4 KB)

or do you have better suggestions or any work around for what I wanted to do?

Thank you very much for your help. :slight_smile:

Hi @Mike26, can you try filtering ( using your uncollapsed table - that is, the table before running qiime taxa collapse? You can follow the suggestions here to produce a QIIME 1-ready BIOM table that should work for @jairideout might still have some additional comments, but please give this a shot in the meantime. Thanks!

1 Like

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

The latest release of QIIME 2 (2017.10) includes a new plugin, q2-quality-control, with similar support as QIIME 1’s script, for filtering out contaminants, non-target DNA, mitochondria, chloroplast, etc. The relevant QIIME 2 command is qiime quality-control exclude-seqs, check it out in the q2-quality-control tutorial!

There are also new commands for taxonomy-based filtering in the q2-taxa plugin, check out this new section of the filtering tutorial for details!

Finally, there are now a couple of ways to filter representative sequences (FeatureData[Sequence]), check out feature-table filter-seqs, taxa filter-seqs, and the filtering tutorial for examples! :tada:

1 Like